awaitVerifyReceipt for transfers in integration-simple
@@ -114,6 +114,7 @@ async function testTransferToSelf(syncWallet: Wallet, token: types.TokenLike, am
let transferCorrect = true;
transferCorrect = transferCorrect && walletBeforeTransfer.sub(fee).eq(walletAfterTransfer);
+ await promiseTimeout(VERIFY_TIMEOUT, transferToNewHandle.awaitVerifyReceipt()); // we should wait for the fee to be applied to the state
transferCorrect = transferCorrect && operatorAfterTransfer.sub(operatorBeforeTransfer).eq(fee);
if (!transferCorrect) {
throw new Error("Transfer to self checks failed");
@@ -151,6 +152,7 @@ async function testTransfer(
let transferCorrect = true;
transferCorrect = transferCorrect && wallet1BeforeTransfer.sub(wallet1AfterTransfer).eq(amount.add(fee));
transferCorrect = transferCorrect && wallet2AfterTransfer.sub(wallet2BeforeTransfer).eq(amount);
+ await promiseTimeout(VERIFY_TIMEOUT, transferToNewHandle.awaitVerifyReceipt()); // we should wait for the fee to be applied to the state
transferCorrect = transferCorrect && operatorAfterTransfer.sub(operatorBeforeTransfer).eq(fee);
if (!transferCorrect) {
throw new Error("Transfer checks failed");
