Skip to content
This repository has been archived by the owner on Mar 16, 2023. It is now read-only.

Commit

Permalink
fix(sdk): change network names to uppercase
Browse files Browse the repository at this point in the history
  • Loading branch information
LeilaWang committed Feb 14, 2020
1 parent 574bf61 commit edf940f
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ export default async function setupNetworkConfig({
account,
} = Web3Service;
const networkName = getNetworkName(networkId);
const networkAddresses = contractAddresses[networkName] || {};
const networkAddresses = contractAddresses[networkName.toLowerCase()] || {};
const customAddresses = {
...contractAddresses,
...networkAddresses,
Expand Down
12 changes: 6 additions & 6 deletions packages/extension/src/config/networks.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,25 @@
export default {
GANACHE: {
networkName: 'ganache',
networkName: 'Ganache',
},
MAIN: {
id: 1,
networkName: 'mainnet',
networkName: 'Mainnet',
},
ROPSTEN: {
id: 3,
networkName: 'ropsten',
networkName: 'Ropsten',
},
RINKEBY: {
id: 4,
networkName: 'rinkeby',
networkName: 'Rinkeby',
},
GOERLI: {
id: 5,
networkName: 'goerli',
networkName: 'Goerli',
},
KOVAN: {
id: 42,
networkName: 'kovan',
networkName: 'Kovan',
},
};
2 changes: 1 addition & 1 deletion packages/extension/src/utils/network/getProviderUrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export default function getProviderUrl(networkId, projectId = infuraProjectId) {
} = network;

return formatStrPattern(infuraProviderUrlPattern, {
networkName,
networkName: networkName.toLowerCase(),
projectId,
});
}

0 comments on commit edf940f

Please sign in to comment.