-
Notifications
You must be signed in to change notification settings - Fork 11.2k
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
update activities to include events coinBalance #6953
Conversation
Jibz1
commented
Dec 20, 2022
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
b99cbc8
to
e6d6132
Compare
apps/wallet/src/ui/app/pages/dapp-tx-approval/TransactionSummaryCard.tsx
Outdated
Show resolved
Hide resolved
|
||
/// Group coins by receiverAddress | ||
// sum coins by coinType for each receiverAddress | ||
const meta = coinsMeta.reduce((acc, value, _) => { |
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.
Why not just remove the _
argument?
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.
Done
/// Group coins by receiverAddress | ||
// sum coins by coinType for each receiverAddress | ||
const meta = coinsMeta.reduce((acc, value, _) => { | ||
return { |
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 wonder if this would be cleaner to just do this when you construct coinsMeta
instead. Instead of a map just make it a forEach
where you insert into an existing object. Seems like it'd simplify things.
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.
Done
e6d6132
to
ceb6bf9
Compare
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.
Need to handle the variable types of v2 transactions, but after that this should be good to go.
return [ | ||
{ label: 'Transaction Type', content: 'MoveCall' }, |
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.
V2 transactions aren't just move calls. They can be any transaction type (Pay, TransferObject, MoveCall, etc). You should adjust this to account for that.
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.
reverted to tx.data.kind
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.
One questions but looks good to me
) | ||
)} | ||
{valuesContent | ||
.slice(1) |
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'm curious why this slice is being done?
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.
just removes the 'Transaction Type: ...
item since we display that as the title.