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

Global getWeb3Provider fixed #775

Conversation

Viterbo
Copy link
Collaborator

@Viterbo Viterbo commented Feb 14, 2024

Fixes #772

Description

This PR fixes the bug described in the issue #772. The problem was that the global getWeb3Provider was returning the current authenticator's provider as the first option not taking into account that you may be using Metamask but at this moment it is pointing to another blockchain. So it does not work.

Now the only possible answer is a JsonRpcProvider which works pretty well for reading the blockchain contracts.

Test scenarios

Checklist:

  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have cleaned up the code in the areas my change touches
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules
  • I have checked my code and corrected any misspellings
  • I have removed any unnecessary console messages
  • I have included all english text to the translation file and/or created a new issue with the required translations for the currently supported languages
  • I have tested for mobile functionality and responsiveness
  • I have added appropriate test coverage

@Viterbo Viterbo self-assigned this Feb 14, 2024
@Viterbo Viterbo linked an issue Feb 14, 2024 that may be closed by this pull request
Copy link

netlify bot commented Feb 14, 2024

Deploy Preview for wallet-staging ready!

Name Link
🔨 Latest commit 7e1606a
🔍 Latest deploy log https://app.netlify.com/sites/wallet-staging/deploys/65ce9faa84f57e000921e98f
😎 Deploy Preview https://deploy-preview-775--wallet-staging.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

Copy link

netlify bot commented Feb 14, 2024

Deploy Preview for wallet-develop-mainnet ready!

Name Link
🔨 Latest commit 7e1606a
🔍 Latest deploy log https://app.netlify.com/sites/wallet-develop-mainnet/deploys/65ce9faae193820008de3daf
😎 Deploy Preview https://deploy-preview-775--wallet-develop-mainnet.netlify.app/
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@ezra-sg
Copy link
Contributor

ezra-sg commented Feb 14, 2024

hmm i am now getting a ton of this one CORS error
image

i think it is related to the change because the jsonRpcProvider is using that URL which is throwing an error, right?

@Viterbo
Copy link
Collaborator Author

Viterbo commented Feb 16, 2024

Thanks @ezra-sg, that was EPIC!!

Copy link
Contributor

@ezra-sg ezra-sg left a comment

Choose a reason for hiding this comment

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

nice! seems to work well for me. i found an issue but it is also present on master, so not due to this PR. I created this: #779

@donnyquixotic donnyquixotic merged commit 4603630 into develop Feb 20, 2024
9 checks passed
@donnyquixotic donnyquixotic deleted the 772-third-party-nfts-are-not-foud-when-metamaks-is-not-in-the-same-network branch February 20, 2024 00:01
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.

Third party NFT's are not foud when Metamaks is not in the same Network
3 participants