diff --git a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts index cdda328dc7..99eaf03aaa 100644 --- a/packages/arb-token-bridge-ui/src/util/TokenUtils.ts +++ b/packages/arb-token-bridge-ui/src/util/TokenUtils.ts @@ -66,7 +66,10 @@ function getErc20DataCache(params: GetErc20DataCacheParams): Erc20Data | null function getErc20DataCache( params?: GetErc20DataCacheParams ): Erc20DataCache | (Erc20Data | null) { - if (typeof window?.localStorage === 'undefined') { + if ( + typeof window === 'undefined' || + typeof window.localStorage === 'undefined' + ) { return null } diff --git a/packages/arb-token-bridge-ui/synpress.config.ts b/packages/arb-token-bridge-ui/synpress.config.ts index 2c4dc619f0..2150d747e3 100644 --- a/packages/arb-token-bridge-ui/synpress.config.ts +++ b/packages/arb-token-bridge-ui/synpress.config.ts @@ -14,13 +14,12 @@ import { TestERC20__factory } from '@arbitrum/sdk/dist/lib/abi/factories/TestERC import { TestWETH9__factory } from '@arbitrum/sdk/dist/lib/abi/factories/TestWETH9__factory' import { Erc20Bridger, EthBridger } from '@arbitrum/sdk' import logsPrinter from 'cypress-terminal-report/src/installLogsPrinter' -import { fetchErc20Data, getL2ERC20Address } from './src/util/TokenUtils' +import { getL2ERC20Address } from './src/util/TokenUtils' import specFiles from './tests/e2e/specfiles.json' import { contractAbi, contractByteCode } from './testErc20Token' import { checkForAssertions, generateActivityOnChains, - NetworkType, fundEth, setupCypressTasks, getCustomDestinationAddress, @@ -70,16 +69,6 @@ export default defineConfig({ async setupNodeEvents(on, config) { logsPrinter(on) - try { - const data = await fetchErc20Data({ - address: defaultL3CustomGasTokenNetwork.nativeToken!, - provider: new StaticJsonRpcProvider('http://127.0.0.1:8547') - }) - console.log({ data }) - } catch (e) { - console.log({ e }) - } - await registerLocalNetwork() const erc20Bridger = await Erc20Bridger.fromProvider(childProvider)