chore: adds Solana support for the account overview#28411
chore: adds Solana support for the account overview#28411
Conversation
|
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. |
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
Builds ready [9d4e4f2]
Page Load Metrics (2087 ± 97 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
.yarn/patches/@metamask-assets-controllers-npm-43.1.0-253de35116.patch
Outdated
Show resolved
Hide resolved
| const updateTimes = { | ||
| [BtcAccountType.P2wpkh]: BTC_AVG_BLOCK_TIME, | ||
| [SolAccountType.DataAccount]: SOLANA_AVG_BLOCK_TIME, | ||
| }; | ||
|
|
||
| this.#tracker.track(account.id, BTC_AVG_BLOCK_TIME); | ||
| // NOTE: Unfortunately, we cannot update the balance right away here, because | ||
| const updateTime = | ||
| updateTimes[account.type as keyof typeof updateTimes] || | ||
| SOLANA_AVG_BLOCK_TIME; | ||
| this.#tracker.track(account.id, updateTime); // NOTE: Unfortunately, we cannot update the balance right away here, because |
There was a problem hiding this comment.
Good catch, but actually it should uses the same values, at least for Bitcoin. Since the block time is much higher, we use this "trick" to wait blockTime / 2 to minimize the downtime.
So actually this was an error 😅
Could you re-use #getBlockTimeFor here too then? (that does not change anything for Solana block time anyway).
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
|
@metamaskbot update-policies |
|
Policies updated. 🧠 Learn how: https://lavamoat.github.io/guides/policy-diff/#what-to-look-for-when-reviewing-a-policy-diff |
…ask/metamask-extension into SOL-2-view-solana-account-overview
Builds ready [6875fa2]
Page Load Metrics (2084 ± 104 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
Co-authored-by: Charly Chevalier <charly.chevalier@consensys.net>
Builds ready [785b0a1]
Page Load Metrics (2236 ± 85 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|





Description
We added support for the Solana account overview. Now when we select a Solana address the user will be able to see its details in the home view.
Also since the overview is the same for SOL and BTC, in order to not repeat components, we've renamed as "non-evm" the existing BTC ones, and reused them.
Related issues
Fixes:
Manual testing steps
As of right now, manually testing is a bit complex, it needs to run the snap manually and the extension, since we 1st need to publish a new release to npm with more up to date work. The snap version we have in npm is outdated and won't support this flow. That said, if you want to go ahead and run locally the steps are the following:
yarnand thenyarn startScreenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist