From 18b07df824185070643430b7845a3f8549375443 Mon Sep 17 00:00:00 2001 From: CounterFire2023 <136581895+CounterFire2023@users.noreply.github.com> Date: Mon, 24 Jun 2024 17:31:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=B9=E9=87=8F=E5=A4=84=E7=90=86=E4=B8=8A?= =?UTF-8?q?=E9=93=BE=E4=BA=A4=E6=98=93=E6=97=B6,=20=E7=AD=89=E5=BE=85?= =?UTF-8?q?=E4=B8=8A=E4=B8=80=E6=AC=A1=E4=BA=A4=E6=98=93=E7=A1=AE=E8=AE=A4?= =?UTF-8?q?=E5=86=8D=E5=BE=80=E4=B8=8B=E8=B5=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/wallet/passPort.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/wallet/passPort.js b/src/wallet/passPort.js index 1d0d62b..b2f5f3f 100644 --- a/src/wallet/passPort.js +++ b/src/wallet/passPort.js @@ -123,7 +123,9 @@ class LPassportWallet { if (action.type === orderbook.ActionType.TRANSACTION) { const builtTx = await action.buildTransaction() console.log(`Submitting ${action.purpose} transaction`) - await this.signer.sendTransaction(builtTx); + const res = await this.signer.sendTransaction(builtTx); + // console.log(res) + await this.web3Provider.waitForTransaction(res.hash) } // For an order to be created (and subsequently filled), Immutable needs a valid signature for the order data. @@ -197,7 +199,8 @@ class LPassportWallet { if (action.type === orderbook.ActionType.TRANSACTION) { const builtTx = await action.buildTransaction(); console.log(`Submitting ${action.purpose} transaction`); - await this.signer.sendTransaction(builtTx); + const res = await this.signer.sendTransaction(builtTx); + await this.web3Provider.waitForTransaction(res.hash) } } } @@ -231,7 +234,8 @@ class LPassportWallet { if (action.type === orderbook.ActionType.TRANSACTION) { const builtTx = await action.buildTransaction(); console.log(`Submitting ${action.purpose} transaction`); - await this.signer.sendTransaction(builtTx); + const res = await this.signer.sendTransaction(builtTx); + await this.web3Provider.waitForTransaction(res.hash) } } console.log(