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

NFTs: filter instead of throw error when NFT has invalid network #5537

Merged
merged 10 commits into from Apr 11, 2024

Conversation

benisgold
Copy link
Member

@benisgold benisgold commented Mar 19, 2024

Fixes APP-####

What changed (plus any additional context for devs)

  • see original bug: https://rainbowhaus.slack.com/archives/C02C2FVC6N6/p1710811991043379
  • happened bc the blast network was added to simplehash nft fetching, however it was not added to our util that converts simplehash chains to rainbow networks
  • fixed by 25c1549
  • in this PR:
    • remove util that converts simplehash chains to rainbow networks, replace with retrieval directly from rainbow network config
    • unrelated cleanup to avoid type assertions

Screen recordings / screenshots

What to test

@benisgold benisgold added the nfts related to nft infra overhaul label Mar 19, 2024
Copy link
Contributor

@skylarbarrera skylarbarrera left a comment

Choose a reason for hiding this comment

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

lgtm

.join(',');
console.log(chainsParam);
Copy link
Contributor

Choose a reason for hiding this comment

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

log

@@ -41,8 +42,9 @@ export async function fetchSimpleHashNFTs(
cursor: string = START_CURSOR
): Promise<{ data: SimpleHashNFT[]; nextCursor: string | null }> {
const chainsParam = RainbowNetworks.filter(network => network.features.nfts)
.map(network => network.nfts?.simplehashNetwork || network.value)
.map(network => network.nfts.simplehashNetwork || network.value)
Copy link
Contributor

Choose a reason for hiding this comment

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

dont need the fallback anymore yeah? the null type may end up causing issues here tho 🤔

Copy link
Member Author

Choose a reason for hiding this comment

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

trueeee

@skylarbarrera skylarbarrera merged commit 8143ba4 into develop Apr 11, 2024
5 of 6 checks passed
@skylarbarrera skylarbarrera deleted the @benisgold/nft-network-fix branch April 11, 2024 18:36
BrodyHughes added a commit that referenced this pull request Apr 17, 2024
…ecks-language

* 'develop' of github.com:rainbow-me/rainbow: (100 commits)
  [WIP]: Swaps v2 quote fetching (#5601)
  chore: app start up spring cleaning (#5622)
  fix remote config (#5627)
  would it kill you to log this only once (#5626)
  Recents (#5625)
  wc: improvements (#5616)
  Degen chain support (#5621)
  send: check contract address (#5586)
  tx requests: metadata (#5584)
  audit: phin (#5624)
  Fix: Wallets being marked as backed up by walletLoadState() (#5593)
  NFTs: filter instead of throw error when NFT has invalid network (#5537)
  Dapp Browser: Search (#5617)
  Browser: bug fixes, animation and UI improvements (#5618)
  cleanup file imports and duplicate types (#5619)
  requests: generalize analytics (#5589)
  browser: account icon clean up (#5612)
  Fix no tab and links (#5613)
  more e2e changes (#5558)
  . (#5615)
  ...
BrodyHughes added a commit that referenced this pull request Apr 18, 2024
…eplink-add

* 'develop' of github.com:rainbow-me/rainbow: (23 commits)
  Add SmoothPager (#5641)
  [APP-1370]: bump sentry sdk to latest (#5640)
  Browser refactor (#5638)
  bump version to v1.9.22 (#5634)
  Price Impact Warning (#5635)
  Disable welcome screen animations when IS_TESTING (#5637)
  init (#5495)
  [WIP]: Swaps v2 quote fetching (#5601)
  chore: app start up spring cleaning (#5622)
  fix remote config (#5627)
  would it kill you to log this only once (#5626)
  Recents (#5625)
  wc: improvements (#5616)
  Degen chain support (#5621)
  send: check contract address (#5586)
  tx requests: metadata (#5584)
  audit: phin (#5624)
  Fix: Wallets being marked as backed up by walletLoadState() (#5593)
  NFTs: filter instead of throw error when NFT has invalid network (#5537)
  Dapp Browser: Search (#5617)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
nfts related to nft infra overhaul
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants