-
Notifications
You must be signed in to change notification settings - Fork 13
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
fix(wallet-dashboard): number of native tokens in migration summary #4619
base: develop
Are you sure you want to change the base?
fix(wallet-dashboard): number of native tokens in migration summary #4619
Conversation
This pull request has been deployed to Vercel. Latest commit: 60843a7 ✅ Preview: https://wallet-dashboard-dl8s0uokm-iota1.vercel.app |
@@ -58,25 +61,35 @@ interface SummarizeMigrationObjectParams { | |||
basicOutputs: IotaObjectData[] | undefined; | |||
nftOutputs: IotaObjectData[] | undefined; | |||
address: string; | |||
resolvedObjects?: ResolvedObjectTypes[]; | |||
} | |||
|
|||
export function summarizeMigratableObjectValues({ |
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 bet this issue also happens in the unmigratable objects too, so we should replicate the same logic there too 🙏🏼
return objects.reduce((total, obj) => { | ||
if ( | ||
obj.commonObjectType === CommonMigrationObjectType.NativeToken && | ||
!uniqueTokens.includes(obj.name) |
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 think there are be potentially 2 coins with the same name but the type must be different, so we should check against the type, not the name
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.
eg
export function getUniqueNativeTokensByCoinType(objects: ResolvedObjectTypes[]): number {
return new Set(
objects
.filter((obj) => obj.commonObjectType === CommonMigrationObjectType.NativeToken)
.map((obj) => obj.coinType),
).size;
}
This pull request has been deployed to Vercel. Latest commit: 075c8d0 ✅ Preview: https://wallet-dashboard-pjzrpyfg3-iota1.vercel.app |
…kens-in-migration-summary
This pull request has been deployed to Vercel. Latest commit: 11d293e ✅ Preview: https://wallet-dashboard-jb7xo8qoi-iota1.vercel.app |
Description of change
Please write a summary of your changes and why you made them.
Links to any relevant issues
fixes #4578
Type of change
Choose a type of change, and delete any options that are not relevant.
How the change has been tested
Describe the tests that you ran to verify your changes.
Make sure to provide instructions for the maintainer as well as any relevant configurations.
Change checklist
Tick the boxes that are relevant to your changes, and delete any items that are not.