From 259bfe40eee75a0f688d17d9f6313e7588613948 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDiga=20Kokelj?= Date: Tue, 12 Sep 2023 08:47:44 +0200 Subject: [PATCH] Match network configuration with Chainlist --- .../walletextension/api/staticOG/javascript.js | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/tools/walletextension/api/staticOG/javascript.js b/tools/walletextension/api/staticOG/javascript.js index d48cf4fbd5..22bd28f6ea 100644 --- a/tools/walletextension/api/staticOG/javascript.js +++ b/tools/walletextension/api/staticOG/javascript.js @@ -10,7 +10,7 @@ const pathJoin = obscuroGatewayVersion + "/join/"; const pathAuthenticate = obscuroGatewayVersion + "/authenticate/"; const pathQuery = obscuroGatewayVersion + "/query/"; const pathRevoke = obscuroGatewayVersion + "/revoke/"; -const obscuroChainIDDecimal = 777; +const obscuroChainIDDecimal = 443; const methodPost = "post"; const methodGet = "get"; const jsonHeaders = { @@ -32,7 +32,6 @@ let provider = null; async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) { // add network to MetaMask let chainIdHex = "0x" + chainIDDecimal.toString(16); // Convert to hexadecimal and prefix with '0x' - try { await ethereum.request({ method: 'wallet_addEthereumChain', @@ -41,12 +40,16 @@ async function addNetworkToMetaMask(ethereum, userID, chainIDDecimal) { chainId: chainIdHex, chainName: 'Obscuro Testnet', nativeCurrency: { - name: 'Obscuro', - symbol: 'OBX', + name: 'Sepolia Ether', + symbol: 'ETH', decimals: 18 }, rpcUrls: [obscuroGatewayAddress+"/"+obscuroGatewayVersion+'/?u='+userID], +<<<<<<< HEAD blockExplorerUrls: null +======= + blockExplorerUrls: ['https://testnet.obscuroscan.io'], +>>>>>>> 5ac5482f (Match network configuration with Chainlist) }, ], }); @@ -314,4 +317,8 @@ const initialize = async () => { } -window.addEventListener(eventDomLoaded, checkIfMetamaskIsLoaded); \ No newline at end of file +<<<<<<< HEAD +window.addEventListener(eventDomLoaded, checkIfMetamaskIsLoaded); +======= +window.addEventListener(eventDomLoaded, initialize); +>>>>>>> 5ac5482f (Match network configuration with Chainlist)