Skip to content

Commit

Permalink
Merge pull request #175 from zkBob/fix/tron-addresses
Browse files Browse the repository at this point in the history
Fixed withdrawal address in history for Tron networks
  • Loading branch information
EvgenKor authored Dec 19, 2023
2 parents 5461720 + aacf9e4 commit 7cfaf7f
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "zkbob-client-js",
"version": "5.4.0",
"version": "5.4.1",
"description": "zkBob integration library",
"repository": "git@github.com:zkBob/libzkbob-client-js.git",
"author": "Dmitry Vdovin <voidxnull@gmail.com>",
Expand Down
4 changes: 2 additions & 2 deletions src/networks/evm/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -788,9 +788,9 @@ export class EvmNetwork extends MultiRpcManager implements NetworkBackend, RpcMa
throw new InternalError(`No signature for approve deposit`);
}
} else if (tx.txType == RegularTxType.BridgeDeposit) {
txInfo.depositAddr = '0x' + tx.memo.slice(32, 72);
txInfo.depositAddr = this.bytesToAddress(hexToBuf(tx.memo.slice(32, 72), 20));
} else if (tx.txType == RegularTxType.Withdraw) {
txInfo.withdrawAddr = '0x' + tx.memo.slice(32, 72);
txInfo.withdrawAddr = this.bytesToAddress(hexToBuf(tx.memo.slice(32, 72), 20));
}

return {
Expand Down
4 changes: 2 additions & 2 deletions src/networks/tron/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -722,9 +722,9 @@ export class TronNetwork extends MultiRpcManager implements NetworkBackend, RpcM
throw new InternalError(`No signature for approve deposit`);
}
} else if (tx.txType == RegularTxType.BridgeDeposit) {
txInfo.depositAddr = '0x' + tx.memo.slice(32, 72);
txInfo.depositAddr = this.bytesToAddress(hexToBuf(tx.memo.slice(32, 72), 20));
} else if (tx.txType == RegularTxType.Withdraw) {
txInfo.withdrawAddr = '0x' + tx.memo.slice(32, 72);
txInfo.withdrawAddr = this.bytesToAddress(hexToBuf(tx.memo.slice(32, 72), 20));
}

return {
Expand Down

0 comments on commit 7cfaf7f

Please sign in to comment.