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

fix(wallet-dashboard): other assets #4574

Open
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

cpl121
Copy link
Member

@cpl121 cpl121 commented Dec 19, 2024

Description of change

Other assets in the dashboard should not contain Coins nor NFTs, it contains at least coins for now
Other assets should just open a new tab in the explorer

Links to any relevant issues

Closes #4572

Type of change

Choose a type of change, and delete any options that are not relevant.

  • Bug fix (a non-breaking change which fixes an issue)
  • Enhancement (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Fix

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.

  • I have followed the contribution guidelines for this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked that new and existing unit tests pass locally with my changes

@cpl121 cpl121 requested a review from a team as a code owner December 19, 2024 16:08
@iota-ci iota-ci added the tooling Issues related to the Tooling team label Dec 19, 2024
@cpl121 cpl121 added the wallet-dashboard Issues related to the Wallet Dashboard dApp label Dec 19, 2024
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: f62f401

✅ Preview: https://wallet-dashboard-bjjykixrs-iota1.vercel.app

Copy link
Contributor

@brancoder brancoder left a comment

Choose a reason for hiding this comment

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

just a nit about code optimization and reverting code added in previous PR

Comment on lines 40 to 41
const visualAssets: IotaObjectData[] = [];
const otherAssets: IotaObjectData[] = [];
Copy link
Contributor

Choose a reason for hiding this comment

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

we simplified this code by removing visualAssets and otherAssets based on the comment in this PR > #4038 (comment)
with this PR we would be reverting back the changes

Copy link
Member Author

Choose a reason for hiding this comment

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

That code was incorrect because the objects were always pushed to assets array
if (selectedCategory == AssetCategory.Visual) { if(hasDisplayData(asset)) { assets.push(asset.data); } } else if(selectedCategory == AssetCategory.Other) { assets.push(asset.data); }
I have added a Map to simplify the code, but also to be able to separate it into the 2 categories, take a look and tell me what you think

@cpl121 cpl121 requested a review from brancoder December 20, 2024 07:42
Copy link
Contributor

This pull request has been deployed to Vercel.

Latest commit: 9b816ec

✅ Preview: https://wallet-dashboard-4gkgpiyw7-iota1.vercel.app

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tooling Issues related to the Tooling team wallet-dashboard Issues related to the Wallet Dashboard dApp
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Fix other assets
3 participants