Skip to content

Conversation

EQuimper
Copy link
Contributor

@EQuimper EQuimper commented Aug 5, 2025

This add E2E testing for L2 Transaction

@EQuimper EQuimper requested a review from BrodyHughes August 5, 2025 18:50
@jinchung
Copy link
Member

jinchung commented Aug 5, 2025

Launch in simulator or device for 5c8fb23

Copy link
Member

@BrodyHughes BrodyHughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

overall lgtm, left a few nits and questions for you about the setup. Sorry for so many comments!

---
# Fund the test wallet with Polygon tokens
- tapOn:
id: fund-polygon-wallet-button
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

jw why this is a separate file instead of just inline in the test itself? I don't mind if it's necessary but seems funny.

}

// Fund the test wallet with ETH directly (this will be detected as the native asset)
// The issue is that Polygon on Anvil should use ETH as the gas token, not POL
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

so this comment isn't accurate actually in a live environment, Polygon should be using POL as the gas token. is this a quirk of Anvil?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BrodyHughes I updated the comment to make it more easy to read.

logger.error(new RainbowError(`[anvilAssets]: Error fetching balances from Anvil node: ${e}`));
return null;

// Fallback: return configured quantities for testnet when balance checks fail
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is nice! i noticed when testing that the balances populated immediately and I'm guessing this is the cause.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes my tought was to make it faster/simpler for testing purpose.


if (testnetMode) {
const { assets, chainIdsInResponse } = await fetchAnvilBalancesByChainId(address, ChainId.mainnet);
const { assets, chainIdsInResponse } = await fetchAnvilBalancesByChainId(address, ChainId.anvil);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

do we need to concat the two here instead of changing to anvil? I know our anvil instance is spun up using a chainId of 1 (which is mainnet). I wonder if were doing two things now:

  1. adding fallback balances that are on ChainId.anvil
  2. sending dev funds on a mainnet fork with anvil using ChainId.mainnet

wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@BrodyHughes I did make an update where I concat them. Thank you !

@jinchung
Copy link
Member

jinchung commented Aug 6, 2025

Launch in simulator or device for 6fb3a05

@EQuimper EQuimper requested a review from janicduplessis August 7, 2025 14:55
@jinchung
Copy link
Member

jinchung commented Aug 7, 2025

Launch in simulator or device for 97daf88

Copy link
Member

@BrodyHughes BrodyHughes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants