From 151ea8005cee1c5457ab78d61955cacda2382644 Mon Sep 17 00:00:00 2001 From: TomerHFB <158162596+TomerHFB@users.noreply.github.com> Date: Tue, 24 Dec 2024 12:37:10 +0200 Subject: [PATCH] feat(@fireblocks/recovery-utility): :sparkles: add erc20 withdrawal support --- apps/recovery-relay/components/WithdrawModal/index.tsx | 6 ++---- apps/recovery-relay/lib/wallets/ERC20/index.ts | 7 +++++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/apps/recovery-relay/components/WithdrawModal/index.tsx b/apps/recovery-relay/components/WithdrawModal/index.tsx index d1089301..2e33a26f 100644 --- a/apps/recovery-relay/components/WithdrawModal/index.tsx +++ b/apps/recovery-relay/components/WithdrawModal/index.tsx @@ -184,13 +184,11 @@ export const WithdrawModal = () => { }} > Transaction Hash: - {asset.getExplorerUrl ? ( + { {txHash} - ) : ( - txHash - )} + } The transaction might take a few seconds to appear on the block explorer diff --git a/apps/recovery-relay/lib/wallets/ERC20/index.ts b/apps/recovery-relay/lib/wallets/ERC20/index.ts index 9d4b2fc5..0ea48263 100644 --- a/apps/recovery-relay/lib/wallets/ERC20/index.ts +++ b/apps/recovery-relay/lib/wallets/ERC20/index.ts @@ -76,8 +76,11 @@ export class ERC20 extends EVMBase implements ConnectedWallet { const { gasPrice, maxFeePerGas, maxPriorityFeePerGas } = await this.provider!.getFeeData(); - const iface = new ethers.Interface(erc20Abi); - const data = iface.encodeFunctionData('transfer', [this.toAddress, BigInt(displayBalance) * BigInt(this.normalizingFactor!)]); + const abiInterface = new ethers.Interface(erc20Abi); + const data = abiInterface.encodeFunctionData('transfer', [ + this.toAddress, + BigInt(displayBalance) * BigInt(this.normalizingFactor!), + ]); const tx = { to: this.tokenAddress,