- 
                Notifications
    
You must be signed in to change notification settings  - Fork 5.4k
 
feat: add option to switch from standard account <-> smart account on accounts details modal #31899
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
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.  | 
    
          
✨ Files requiring CODEOWNER review ✨🖥️ @MetaMask/wallet-ux 
  | 
    
| 
           ❌ API Spec Test Failed. View the report here.  | 
    
…ension into acc_details_change
…ension into acc_details_change
…ension into acc_details_change
        
          
                test/e2e/constants.ts
              
                Outdated
          
        
      | export const DEFAULT_FIXTURE_ACCOUNT = | ||
| '0x5CfE73b6021E818B776b421B1c4Db2474086a7e1'; | ||
| 
               | 
          ||
| export const DEFAULT_FIXTURE_ACCOUNT_SHOTENED = | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should this be DEFAULT_FIXTURE_ACCOUNT_SHORTENED (added R)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is updated
| </Box> | ||
| <Tabs | ||
| onTabClick={() => undefined} | ||
| style={{ width: '100%', marginTop: 8 }} | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be 8px?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is updated
| <Preloader size={18} /> | ||
| </Box> | ||
| )} | ||
| {network7702List?.map((networkConfiguration) => ( | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @darkwing : I am not sure why it is like this for you, but it's good point. @bschorchit : what should we display when there are no networks in the list.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree with @darkwing 's suggestion! We can hide this tab if there are no networks in the list. Would that require a loading period though while we fetch for the networks?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes, it would need a loading period
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| expect(mockDispatch).toHaveBeenCalledTimes(1); | ||
| }); | ||
| 
               | 
          ||
| it('does not renders for confirmation not coming from DAPP', () => { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
does not render (removed s)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is updated
| const { chainId, txParams, origin } = currentConfirmation ?? {}; | ||
| const { from } = txParams; | ||
| 
               | 
          ||
| if (!currentConfirmation || acknowledged || origin === 'metamask') { | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we have a constant for metamask (ORIGIN_METAMASK)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR is updated
| ), | ||
| )) as unknown as TransactionMeta; | ||
| 
               | 
          ||
| setTransactionId(transactionMeta?.id); | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Outside my scope of knowledge but would we want to call setTransactionId if that id is undefined?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This fn call await dispatch(addTransactionAndRouteToConfirmationPage( generates id.
          Builds ready [7be4724]
 UI Startup Metrics (1262 ± 64 ms)
 Bundle size diffs [🚨 Warning! Bundle size has increased!]
  | 
    
…ension into acc_details_change
…ension into acc_details_change
          Builds ready [5c4418a]
 UI Startup Metrics (1221 ± 70 ms)
  | 
    
          Builds ready [46a96df]
 UI Startup Metrics (1230 ± 62 ms)
  | 
    
          Builds ready [7ba6792]
 UI Startup Metrics (1213 ± 64 ms)
  | 
    



Description
Add option to switch from standard account <-> smart account on accounts details modal.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4485
Manual testing steps
Screenshots/Recordings
Pre-merge author checklist
Pre-merge reviewer checklist