diff --git a/common/reducers/config/networks/staticNetworks.ts b/common/reducers/config/networks/staticNetworks.ts index 7843c327..cdb4524e 100644 --- a/common/reducers/config/networks/staticNetworks.ts +++ b/common/reducers/config/networks/staticNetworks.ts @@ -23,12 +23,16 @@ export type State = { [key in StaticNetworkIds]: StaticNetworkConfig }; // Must be a website that follows the ethplorer convention of /tx/[hash] and // address/[address] to generate the correct functions. // TODO: put this in utils / libs -export function makeExplorer(name: string, origin: string): BlockExplorerConfig { +export function makeExplorer( + name: string, + origin: string, + addressPath: string = 'address' +): BlockExplorerConfig { return { name, origin, txUrl: hash => `${origin}/tx/${hash}`, - addressUrl: address => `${origin}/address/${address}`, + addressUrl: address => `${origin}/${addressPath}/${address}`, blockUrl: blockNum => `${origin}/block/${blockNum}` }; } @@ -118,7 +122,7 @@ export const INITIAL_STATE: State = { chainId: 61, isCustom: false, color: '#669073', - blockExplorer: makeExplorer('GasTracker', 'https://gastracker.io'), + blockExplorer: makeExplorer('GasTracker', 'https://gastracker.io', 'addr'), tokens: require('config/tokens/etc.json'), contracts: require('config/contracts/etc.json'), dPathFormats: {