Skip to content

Commit

Permalink
chore: layer2 sendTx returns zkTx hash
Browse files Browse the repository at this point in the history
  • Loading branch information
tkmct authored and wanseob committed Nov 25, 2021
1 parent 1ebec11 commit 94ee035
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/zk-wizard/src/zk-wallet-account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -748,13 +748,14 @@ export class ZkWalletAccount {
tx: RawTx
from?: ZkAccount
encryptTo?: ZkAddress
}): Promise<void> {
}): Promise<string> {
const zkTx = await this.shieldTx({ tx, from, encryptTo })
const response = await this.sendLayer2Tx(zkTx)
if (response.status !== 200) {
await this.unlockUtxos(tx.inflow)
throw Error(await response.text())
}
return zkTx.hash.toString()
}

private async deposit(note: Utxo, fee: Fp): Promise<boolean> {
Expand Down

0 comments on commit 94ee035

Please sign in to comment.