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

update activities to include events coinBalance #6953

Merged
merged 13 commits into from
Jan 14, 2023

Conversation

Jibz1
Copy link
Contributor

@Jibz1 Jibz1 commented Dec 20, 2022

Screenshot 2022-12-20 at 5 15 04 PM

@Jibz1 Jibz1 requested a review from Jordan-Mysten December 20, 2022 22:21
@vercel
Copy link

vercel bot commented Dec 20, 2022

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated
explorer 🔄 Building (Inspect) Jan 10, 2023 at 7:06AM (UTC)
2 Ignored Deployments
Name Status Preview Comments Updated
explorer-storybook ⬜️ Ignored (Inspect) Jan 10, 2023 at 7:06AM (UTC)
wallet-adapter ⬜️ Ignored (Inspect) Jan 10, 2023 at 7:06AM (UTC)

@Jibz1 Jibz1 requested a review from pchrysochoidis January 5, 2023 17:50
@Jibz1 Jibz1 force-pushed the wallet-update-txn-activities branch from b99cbc8 to e6d6132 Compare January 6, 2023 18:18
apps/wallet/src/ui/app/pages/dapp-tx-approval/index.tsx Outdated Show resolved Hide resolved
apps/wallet/src/ui/app/helpers/getEventsSummary.ts Outdated Show resolved Hide resolved

/// Group coins by receiverAddress
// sum coins by coinType for each receiverAddress
const meta = coinsMeta.reduce((acc, value, _) => {
Copy link
Contributor

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?

Copy link
Contributor Author

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 {
Copy link
Contributor

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

@Jibz1 Jibz1 force-pushed the wallet-update-txn-activities branch from e6d6132 to ceb6bf9 Compare January 8, 2023 23:16
Copy link
Contributor

@Jordan-Mysten Jordan-Mysten left a 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' },
Copy link
Contributor

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.

Copy link
Contributor Author

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

@Jibz1 Jibz1 requested a review from Jordan-Mysten January 10, 2023 15:59
Copy link
Contributor

@Jordan-Mysten Jordan-Mysten left a 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)
Copy link
Contributor

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?

Copy link
Contributor Author

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.

@Jibz1 Jibz1 merged commit 293d455 into main Jan 14, 2023
@Jibz1 Jibz1 deleted the wallet-update-txn-activities branch January 14, 2023 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants