Skip to content

Commit

Permalink
chore: solving conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
wainola committed Jun 4, 2024
2 parents 0176aa8 + d57233e commit 355f6fd
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions packages/widget/src/controllers/transfers/evm/execute.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ export async function executeNextEvmTransaction(
if (this.getTransferState() === FungibleTransferState.PENDING_APPROVALS) {
this.waitingUserConfirmation = true;
this.host.requestUpdate();
const transactions = [];
try {
const tx = await signer.sendTransaction(
this.pendingEvmApprovalTransactions[0] as TransactionRequest
Expand All @@ -32,8 +33,6 @@ export async function executeNextEvmTransaction(
await tx.wait();
this.pendingEvmApprovalTransactions.shift();

const transactions = [];

transactions.push(
...this.pendingEvmApprovalTransactions,
this.pendingTransferTransaction
Expand All @@ -52,6 +51,12 @@ export async function executeNextEvmTransaction(
this.waitingUserConfirmation = false;
this.waitingTxExecution = false;
this.host.requestUpdate();
await estimateEvmGas(
this.sourceNetwork?.chainId as number,
this.walletContext.value?.evmWallet?.provider as Eip1193Provider,
this.walletContext.value?.evmWallet?.address as string,
transactions as UnsignedTransaction[]
);
}
return;
}
Expand Down

0 comments on commit 355f6fd

Please sign in to comment.