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

Improving approve transaction flow #17537

Closed
wants to merge 44 commits into from
Closed

Conversation

jpuri
Copy link
Contributor

@jpuri jpuri commented Feb 1, 2023

@jpuri jpuri requested review from danjm and seaona February 1, 2023 12:25
@jpuri jpuri requested a review from a team as a code owner February 1, 2023 12:25
@github-actions
Copy link
Contributor

github-actions bot commented Feb 1, 2023

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.

@jpuri jpuri requested a review from kumavis as a code owner February 1, 2023 12:43
@jpuri jpuri force-pushed the approve_transaction_improvement branch from d5ccc57 to 701d041 Compare February 1, 2023 13:29
@jpuri jpuri changed the base branch from develop to move_conf_tx February 1, 2023 13:30
@jpuri jpuri force-pushed the approve_transaction_improvement branch from 553a4d3 to 71e9628 Compare February 1, 2023 14:33
@jpuri jpuri changed the base branch from move_conf_tx to develop February 1, 2023 14:33
@metamaskbot
Copy link
Collaborator

Builds ready [71e9628]
Page Load Metrics (1344 ± 105 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint1001911282110
domContentLoaded10461634132020799
load104616431344218105
domInteractive10461633132020799
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 177 bytes
  • ui: 0 bytes
  • common: 0 bytes

@jpuri jpuri marked this pull request as draft February 3, 2023 23:20
@jpuri jpuri force-pushed the approve_transaction_improvement branch from 71e9628 to 88bb624 Compare February 6, 2023 12:16
@jpuri jpuri marked this pull request as ready for review February 6, 2023 12:16
jpuri added 2 commits February 6, 2023 18:08
…/metamask-extension into approve_transaction_improvement
@metamaskbot
Copy link
Collaborator

Builds ready [1a34761]
Page Load Metrics (1259 ± 121 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint93145117157
domContentLoaded94918221228248119
load97918221259252121
domInteractive94918221228248119
Bundle size diffs
  • background: 0 bytes
  • ui: 179 bytes
  • common: 0 bytes

@jpuri jpuri marked this pull request as draft February 6, 2023 13:59
@metamaskbot
Copy link
Collaborator

Builds ready [30e4be6]
Page Load Metrics (1317 ± 100 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint882941194321
domContentLoaded9961547129119493
load100416701317208100
domInteractive9961547129119493
Bundle size diffs
  • background: 0 bytes
  • ui: 179 bytes
  • common: 0 bytes

@@ -99,6 +108,7 @@ export default function TransactionDecoding({ to = '', inputData: data = '' }) {
}
}
})();
return () => setMounted(false);
}, [t, from, to, network, data]);

// ***********************************************************
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 file's change are not directly related to task, but were needed to remove warnings from new test cases added.

getByText(sendWithApproveTransaction.txParams.data),
).toBeInTheDocument();
});
});
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I named this file as confirm-transaction.nomock.test.js since @digiwand is also working on test coverage of same file with mocking. #17473

@jpuri jpuri requested review from segun and digiwand February 9, 2023 00:25
@jpuri
Copy link
Contributor Author

jpuri commented Feb 9, 2023

@digiwand , @segun : can you plz re-approve, I updated the PR to resolve conflicts and implement review feedbacks.

@seaona : The PR also needs some QA attention.

digiwand
digiwand previously approved these changes Feb 9, 2023
@metamaskbot
Copy link
Collaborator

Builds ready [66807f3]
Page Load Metrics (1379 ± 177 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint962031362713
domContentLoaded94621771337341164
load97323361379368177
domInteractive94521771337341164
Bundle size diffs
  • background: 0 bytes
  • ui: 1219 bytes
  • common: 0 bytes

@jpuri jpuri requested a review from digiwand February 9, 2023 05:40
digiwand
digiwand previously approved these changes Feb 9, 2023
@seaona
Copy link
Contributor

seaona commented Feb 9, 2023

I've noticed that the recipient on the top header is pointing to the incorrect address. We should point to the Contract's address

image

@seaona
Copy link
Contributor

seaona commented Feb 9, 2023

I am not 100% confident on reviewing the code at this level but somehow I believe we could re-use some methods/screen that are implemented for the generic Contract Interaction case. With that I mean, taking the example of the Deposit function from the test-dapp, we call a contract function with value. In this case, the exact same result should happen (screen is the same with all the components), so maybe we could re-use some of that?
Maybe to point directly to the confirm-contract-interaction.js ?

Let me know if this makes sense to you

deposit.mp4

segun
segun previously approved these changes Feb 9, 2023
@jpuri jpuri dismissed stale reviews from segun and digiwand via 6ac4a3e February 9, 2023 18:40
@jpuri
Copy link
Contributor Author

jpuri commented Feb 9, 2023

Hey @seaona : I fixed recipient address, can you plz retest.

@metamaskbot
Copy link
Collaborator

Builds ready [b76a311]
Page Load Metrics (1377 ± 141 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint96152118168
domContentLoaded102219171358282135
load102219171377294141
domInteractive102219171358282135

@codecov-commenter
Copy link

Codecov Report

Merging #17537 (b76a311) into develop (1dbacc2) will increase coverage by 0.41%.
The diff coverage is 85.71%.

📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more

@@             Coverage Diff             @@
##           develop   #17537      +/-   ##
===========================================
+ Coverage    61.96%   62.38%   +0.41%     
===========================================
  Files          908      908              
  Lines        35137    35159      +22     
  Branches      8907     8919      +12     
===========================================
+ Hits         21772    21931     +159     
+ Misses       13365    13228     -137     
Impacted Files Coverage Δ
...ontent/confirm-page-container-content.component.js 84.78% <ø> (+8.70%) ⬆️
...page-container/confirm-page-container.component.js 63.64% <ø> (+1.52%) ⬆️
ui/helpers/utils/util.js 85.84% <ø> (ø)
...confirm-send-ether/confirm-send-ether.container.js 50.00% <0.00%> (+50.00%) ⬆️
...saction-decoding/transaction-decoding.component.js 34.44% <71.43%> (+33.24%) ⬆️
ui/helpers/utils/transactions.util.js 45.78% <83.33%> (+2.93%) ⬆️
...ummary/confirm-page-container-summary.component.js 87.23% <100.00%> (+2.45%) ⬆️
...confirm-send-ether/confirm-send-ether.component.js 66.67% <100.00%> (+66.67%) ⬆️
...saction-base/confirm-transaction-base.component.js 47.52% <100.00%> (+6.27%) ⬆️
...ion-switch/confirm-transaction-switch.component.js 38.30% <100.00%> (+38.30%) ⬆️
... and 37 more

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

@seaona
Copy link
Contributor

seaona commented Feb 15, 2023

I see the issue fixed @jpuri ! Nice work!! I just have a remaining question, I directed in slack and after this is clarified the PR should be ready

@jpuri jpuri marked this pull request as draft February 16, 2023 06:29
@jpuri
Copy link
Contributor Author

jpuri commented Feb 16, 2023

Closing in favour of #17777

@jpuri jpuri closed this Feb 16, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2023
@jpuri jpuri deleted the approve_transaction_improvement branch September 11, 2024 16:14
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-qa Label will automate into QA workspace
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants