diff --git a/packages/arb-token-bridge-ui/src/util/ExponentialBackoffUtils.ts b/packages/arb-token-bridge-ui/src/util/ExponentialBackoffUtils.ts new file mode 100644 index 0000000000..b715e35da9 --- /dev/null +++ b/packages/arb-token-bridge-ui/src/util/ExponentialBackoffUtils.ts @@ -0,0 +1,3 @@ +export function wait(ms: number) { + return new Promise(resolve => setTimeout(resolve, ms)) +} diff --git a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogsSequentially.ts b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogsSequentially.ts index 7d2ac67c0a..6815e32389 100644 --- a/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogsSequentially.ts +++ b/packages/arb-token-bridge-ui/src/util/withdrawals/fetchTokenWithdrawalsFromEventLogsSequentially.ts @@ -8,10 +8,7 @@ import { } from './fetchTokenWithdrawalsFromEventLogs' import { getNonce } from '../AddressUtils' import { fetchL2Gateways } from '../fetchL2Gateways' - -function wait(ms: number) { - return new Promise(resolve => setTimeout(resolve, ms)) -} +import { wait } from '../ExponentialBackoffUtils' async function getGateways(provider: Provider): Promise<{ standardGateway: string