Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
brtkx committed Oct 22, 2024
1 parent 4f040ff commit a3ab216
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/arb-token-bridge-ui/src/util/TokenUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ function getErc20DataCache(params: GetErc20DataCacheParams): Erc20Data | null
function getErc20DataCache(
params?: GetErc20DataCacheParams
): Erc20DataCache | (Erc20Data | null) {
if (typeof window.localStorage === 'undefined') {
if (typeof window?.localStorage === 'undefined') {
return null
}

Expand Down
13 changes: 12 additions & 1 deletion packages/arb-token-bridge-ui/synpress.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,13 @@ 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 { getL2ERC20Address } from './src/util/TokenUtils'
import { fetchErc20Data, getL2ERC20Address } from './src/util/TokenUtils'
import specFiles from './tests/e2e/specfiles.json'
import { contractAbi, contractByteCode } from './testErc20Token'
import {
checkForAssertions,
generateActivityOnChains,
NetworkType,
fundEth,
setupCypressTasks,
getCustomDestinationAddress,
Expand Down Expand Up @@ -69,6 +70,16 @@ 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)
Expand Down

0 comments on commit a3ab216

Please sign in to comment.