-
Notifications
You must be signed in to change notification settings - Fork 5.2k
fix: Display "🦊 Smart contract" in "interacting with" row for batch transaction confirmations #31507
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/confirmations
|
Builds ready [6ba7186]
UI Startup Metrics (1243 ± 63 ms)
Bundle size diffs
|
Builds ready [a2ba28d]
UI Startup Metrics (1182 ± 65 ms)
Bundle size diffs
|
@@ -53,13 +56,16 @@ export const RecipientRow = ({ recipient }: { recipient?: Hex } = {}) => { | |||
const t = useI18nContext(); | |||
const { currentConfirmation } = useConfirmContext<TransactionMeta>(); | |||
const to = recipient ?? currentConfirmation?.txParams?.to; | |||
const isBatchTransaction = |
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.
Rather than relying on the type, as we may add more batch types in future, should we instead rely on checking the length of nestedTransactions
in TransactionMeta
?
As that's what triggers the nested transaction data component, plus the metrics.
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.
Perfect, changed to check the length of the nestedTransactions
.
|
||
if (!to || !isValidAddress(to)) { | ||
if (!to || !isValidAddress(to) || isBatchTransaction) { |
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 we be future-proof and also check if to
is equal to from
?
Just in case we send batch transactions elsewhere in future.
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, I pushed a fix to check if to
is equal to from
as well.
Builds ready [80b4e52]
UI Startup Metrics (1240 ± 59 ms)
Bundle size diffs
|
80b4e52
to
16920ca
Compare
Builds ready [16920ca]
UI Startup Metrics (1211 ± 63 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [8e7b08c]
UI Startup Metrics (1229 ± 68 ms)
Bundle size diffs
|
Builds ready [fa8583a]
UI Startup Metrics (1267 ± 73 ms)
Bundle size diffs
|
...ges/confirmations/components/confirm/info/shared/transaction-details/transaction-details.tsx
Outdated
Show resolved
Hide resolved
deec64b
to
42d37af
Compare
Builds ready [42d37af]
UI Startup Metrics (1669 ± 199 ms)
|
Builds ready [dfc52c0]
UI Startup Metrics (1219 ± 57 ms)
|
Description
This PR aims to hide the
interacting with
row when the transaction is a batch transaction.Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/4504
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist