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

Fixed hardware wallet info popup on token allowance screen #17881

Merged

Conversation

filipsekulic
Copy link
Contributor

Explanation

Screenshots/Screencaps

After

After.mov

Manual Testing Steps

  1. Import a hardware wallet account
  2. Go to test dapp - https://metamask.github.io/test-dapp/
  3. Connect HW account
  4. Click Create Token
  5. Accept tx on MM and on Hardware Wallet
  6. Click Approve Tokens

@filipsekulic filipsekulic self-assigned this Feb 23, 2023
@github-actions
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.

@metamaskbot
Copy link
Collaborator

Builds ready [4c1972d]
Page Load Metrics (1706 ± 59 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint97157119157
domContentLoaded14971981167712862
load15191998170612359
domInteractive14971981167712862
Bundle size diffs
  • background: 0 bytes
  • ui: 428 bytes
  • common: 0 bytes

@dzfjz
Copy link
Contributor

dzfjz commented Feb 24, 2023

Verified by QA

@filipsekulic filipsekulic marked this pull request as ready for review February 24, 2023 10:43
@filipsekulic filipsekulic requested a review from a team as a code owner February 24, 2023 10:43
<Box paddingLeft={2} paddingRight={2}>
<LedgerInstructionField showDataInstruction />
</Box>
)}
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey will be nice to have test coverage for above.

Copy link
Contributor

@brad-decker brad-decker Feb 28, 2023

Choose a reason for hiding this comment

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

Seconded. Thirded.

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 here: ce80c0e

Copy link
Contributor

@digiwand digiwand left a comment

Choose a reason for hiding this comment

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

LGTM, I agree with @jpuri that it would be handy to add tests. I can approve after we add a test

<Box paddingLeft={2} paddingRight={2}>
<LedgerInstructionField showDataInstruction />
</Box>
)}
Copy link
Contributor

@brad-decker brad-decker Feb 28, 2023

Choose a reason for hiding this comment

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

Seconded. Thirded.

@filipsekulic filipsekulic force-pushed the fix/show-hardware-wallet-info-on-token-allowance-screen branch from 4c1972d to b3ee025 Compare March 1, 2023 14:17
@filipsekulic filipsekulic force-pushed the fix/show-hardware-wallet-info-on-token-allowance-screen branch from ce80c0e to 23b9e71 Compare March 2, 2023 08:52
@metamaskbot
Copy link
Collaborator

Builds ready [40b9362]
Page Load Metrics (1517 ± 63 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint95166116168
domContentLoaded12381672149511957
load12381676151713163
domInteractive12381672149511957
Bundle size diffs
  • background: 0 bytes
  • ui: 428 bytes
  • common: 0 bytes

const textField = getByTestId('custom-spending-cap-input');
fireEvent.change(textField, { target: { value: '1' } });

const nextButton = getByText('Next');
Copy link
Contributor

Choose a reason for hiding this comment

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

nice! tests look good. could be handy to add an additional null check to check the text is not showing on the first page

Suggested change
const nextButton = getByText('Next');
expect(queryByText('Prior to clicking confirm:')).toBeNull();
const nextButton = getByText('Next');

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good suggestion! Thanks!
Changed it here: 455663d

@metamaskbot
Copy link
Collaborator

Builds ready [455663d]
Page Load Metrics (1697 ± 77 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint961881232010
domContentLoaded14051922166014771
load14801946169716077
domInteractive14051922166014771
Bundle size diffs
  • background: 0 bytes
  • ui: 428 bytes
  • common: 0 bytes

@codecov-commenter
Copy link

codecov-commenter commented Mar 3, 2023

Codecov Report

Merging #17881 (5857fc5) into develop (38e2a25) will increase coverage by 0.11%.
The diff coverage is 100.00%.

@@             Coverage Diff             @@
##           develop   #17881      +/-   ##
===========================================
+ Coverage    63.45%   63.55%   +0.11%     
===========================================
  Files          903      903              
  Lines        35264    35267       +3     
  Branches      8919     8921       +2     
===========================================
+ Hits         22374    22413      +39     
+ Misses       12890    12854      -36     
Impacted Files Coverage Δ
ui/pages/token-allowance/token-allowance.js 63.36% <100.00%> (+0.86%) ⬆️
ui/ducks/app/app.ts 62.39% <0.00%> (+1.71%) ⬆️
...dger-instruction-field/ledger-instruction-field.js 49.32% <0.00%> (+46.58%) ⬆️

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

jpuri
jpuri previously approved these changes Mar 7, 2023
@filipsekulic filipsekulic force-pushed the fix/show-hardware-wallet-info-on-token-allowance-screen branch from 455663d to 5857fc5 Compare March 8, 2023 10:32
@metamaskbot
Copy link
Collaborator

Builds ready [5857fc5]
Page Load Metrics (1516 ± 50 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint100152119157
domContentLoaded13071852150210450
load13071852151610350
domInteractive13061852150210450
Bundle size diffs
  • background: 0 bytes
  • ui: 428 bytes
  • common: 0 bytes

@brad-decker brad-decker merged commit c477e29 into develop Mar 14, 2023
@brad-decker brad-decker deleted the fix/show-hardware-wallet-info-on-token-allowance-screen branch March 14, 2023 17:29
@github-actions github-actions bot locked and limited conversation to collaborators Mar 14, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
7 participants