From 3e4b673bb513d702fdc13a6e61e13b96a4ae1704 Mon Sep 17 00:00:00 2001 From: Evan Gray Date: Tue, 31 Aug 2021 13:11:22 -0400 Subject: [PATCH] sdk/js: eth wait for token approval Change-Id: I9e2c0908c75983105420168c8e181581a99cd8b8 --- sdk/js/src/token_bridge/transfer.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/js/src/token_bridge/transfer.ts b/sdk/js/src/token_bridge/transfer.ts index 2a82b400..80be64f4 100644 --- a/sdk/js/src/token_bridge/transfer.ts +++ b/sdk/js/src/token_bridge/transfer.ts @@ -25,7 +25,7 @@ export async function transferFromEth( // signerAddress, // tokenBridgeAddress // ); - await token.approve(tokenBridgeAddress, amount); + await (await token.approve(tokenBridgeAddress, amount)).wait(); const fee = 0; // for now, this won't do anything, we may add later const bridge = Bridge__factory.connect(tokenBridgeAddress, signer); const v = await bridge.transferTokens(