Return exit code for full exit integration
@@ -74,6 +74,7 @@ async function testWrongETHWalletFullExit(ethWallet: ethers.Wallet, syncWallet:
}
(async () => {
+ try {
const WEB3_URL = process.env.WEB3_URL;
// Mnemonic for eth wallet.
const MNEMONIC = process.env.MNEMONIC;
@@ -106,13 +107,16 @@ async function testWrongETHWalletFullExit(ethWallet: ethers.Wallet, syncWallet:
depositTo: syncWallet2.address(),
token,
amount,
+ approveDepositAmountForERC20: true,
});
await deposit.awaitReceipt();
await testWrongETHWalletFullExit(ethWallet, syncWallet2, token);
await testNormalFullExit(syncWallet2, token);
await testEmptyBalanceFullExit(syncWallet2, token);
}
-
-
await syncProvider.disconnect();
+ } catch (e) {
+ console.error("Error:", e);
+ process.exit(1);
+ }
})();
