Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Multichain debug #28402

Merged

Conversation

seaona
Copy link
Contributor

@seaona seaona commented Nov 11, 2024

Description

List of failing tests:

  • Malicious Confirmation Signature - Bad Domain @no-mmi displays alert for domain binding and confirms
  • Malicious Confirmation Signature - Bad Domain @no-mmi initiates and rejects from confirmation screen
  • Malicious Confirmation Signature - Bad Domain @no-mmi initiates and rejects from alert friction modal
  • Malicious Confirmation Signature - Bad Domain @no-mmi displays alert for domain binding and confirms
  • Malicious Confirmation Signature - Bad Domain @no-mmi initiates and rejects from confirmation screen
  • Malicious Confirmation Signature - Bad Domain @no-mmi initiates and rejects from alert friction modal
  • smart transactions @no-mmi Completes a Swap
  • Simple Send Security Alert - Blockaid @no-mmi should not show security alerts for benign requests
  • Simple Send Security Alert - Blockaid @no-mmi should show security alerts for malicious requests
  • MultiRpc: should select rpc from modal
  • MetaMask onboarding @no-mmi doesn't make any network requests to infura before create new wallet onboarding is completed
  • MetaMask onboarding @no-mmi doesn't make any network requests to infura before onboarding by import is completed
  • MetaMask onboarding @no-mmi doesn't make any network requests to infura before create new wallet onboarding is completed
  • MetaMask onboarding @no-mmi doesn't make any network requests to infura before onboarding by import is completed

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to this page...

Screenshots/Recordings

Swaps

swaps-balance.mp4

ENS

ens-balance.mp4

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

@seaona seaona requested a review from a team as a code owner November 11, 2024 11:57
Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.


// click send button on homepage to start send flow
const homepage = new HomePage(driver);
await homepage.check_pageIsLoaded();
await homepage.check_expectedBalanceIsDisplayed('<0.000001');
await homepage.check_expectedBalanceIsDisplayed('20');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

the mock adds more balance, so we are able to perform a send to ENS in the future

['eth_chainId', { result: `0x${chainId}` }],
// 1. Get the address of the resolver for the specified node
Copy link
Contributor Author

Choose a reason for hiding this comment

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

added some documentation and variables to make the ENS mocks more explicit

result: {},
},
}));
await mockMultiNetworkBalancePolling(mockServer);
Copy link
Contributor Author

Choose a reason for hiding this comment

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

polling balance mocks are extracted in this new function, this way we'll be able to use it in other tests

await mockServerJsonRpc(mockServer, [
['eth_blockNumber'],
['eth_call'],
['eth_estimateGas'],
['eth_feeHistory'],
['eth_gasPrice'],
['eth_getBalance'],
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed, as we are mocking the balances using the mockMultiNetworkBalancePolling

id: 3806592044086814,
jsonrpc: '2.0',
result: '0x1bc16d674ec80000', // 2 ETH
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed, as we are mocking the balances using the mockMultiNetworkBalancePolling

await withFixtures(
{
fixtures: new FixtureBuilder({ inputChainId })
Copy link
Contributor Author

Choose a reason for hiding this comment

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

this is not needed and creates a miss-match with networks, causing to send network requests to localhost
we are using the fitxutre withEthereumMainnet, so we shouldn't change anything from the localhost default fixture

https://github.com/MetaMask/metamask-extension/blob/develop/test/e2e/default-fixture.js#L174

(I think we should also remove this from the default fixture to avoid future network miss-matches, but we can leave this out of scope from this PR)

@metamaskbot
Copy link
Collaborator

Builds ready [30ba00e]
Page Load Metrics (2219 ± 190 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint179632162225397190
domContentLoaded178331632185380182
load179632032219395190
domInteractive28156533115
backgroundConnect10112322612
firstReactRender9352817310852
getState574242211
initialActions01000
loadScripts129324941637318153
setupStore66517199
uiStartup207935642597458220
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 142 Bytes (0.00%)
  • ui: 1.35 KiB (0.02%)
  • common: 305 Bytes (0.00%)

@sahar-fehri sahar-fehri merged commit 9aff235 into feat/multi-chain-for-account-tracker-controller-v2 Nov 13, 2024
71 checks passed
@sahar-fehri sahar-fehri deleted the multichain-debug branch November 13, 2024 17:46
@github-actions github-actions bot locked and limited conversation to collaborators Nov 13, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [30ba00e]
Page Load Metrics (2219 ± 190 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint179632162225397190
domContentLoaded178331632185380182
load179632032219395190
domInteractive28156533115
backgroundConnect10112322612
firstReactRender9352817310852
getState574242211
initialActions01000
loadScripts129324941637318153
setupStore66517199
uiStartup207935642597458220
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 142 Bytes (0.00%)
  • ui: 1.35 KiB (0.02%)
  • common: 305 Bytes (0.00%)

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

Successfully merging this pull request may close these issues.

3 participants