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

Add Obscuro network icon to add chain method #1535

Closed
wants to merge 2 commits into from

Conversation

0xjba
Copy link
Contributor

@0xjba 0xjba commented Sep 19, 2023

Why this change is needed

The current Add Chain method was missing the Icons parameter & hence the network listed on Metamask didn't show the Obscuro icon.

What changes were made as part of this PR

Uploaded the Obscuro icon, as well as the parameter for the same in the Add Chain method.

PR checks pre-merging

Please indicate below by ticking the checkbox that you have read and performed the required
PR checks

  • PR checks reviewed and performed

@0xjba 0xjba requested a review from zkokelj September 19, 2023 12:48
@@ -39,6 +39,7 @@ async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) {
{
chainId: chainIdHex,
chainName: 'Obscuro Testnet',
iconUrls: [https://raw.githubusercontent.com/obscuronet/go-obscuro/main/tools/walletextension/api/staticOG/Metamask%20Network%20Icon.png],
Copy link
Contributor

Choose a reason for hiding this comment

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

"" required when passing URL string

@@ -39,6 +39,7 @@ async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) {
{
chainId: chainIdHex,
chainName: 'Obscuro Testnet',
iconUrls: [https://raw.githubusercontent.com/obscuronet/go-obscuro/main/tools/walletextension/api/staticOG/Metamask%20Network%20Icon.png],
Copy link
Contributor

Choose a reason for hiding this comment

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

This approach does not work.
See the official Metamask documentation: https://docs.metamask.io/wallet/reference/rpc-api/#wallet_addethereumchain
(parameter is currently ignored)

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.

3 participants