Uppercase Networks enum values
This commit is contained in:
@@ -129,7 +129,7 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
|
|||||||
<div>
|
<div>
|
||||||
The 0x smart contracts are not deployed on the Ethereum network you are currently connected to
|
The 0x smart contracts are not deployed on the Ethereum network you are currently connected to
|
||||||
(network Id: {this.props.networkId}). In order to use the 0x portal dApp, please connect to the{' '}
|
(network Id: {this.props.networkId}). In order to use the 0x portal dApp, please connect to the{' '}
|
||||||
{Networks.kovan} testnet (network Id: {constants.NETWORK_ID_KOVAN})
|
{Networks.Kovan} testnet (network Id: {constants.NETWORK_ID_KOVAN})
|
||||||
{configs.IS_MAINNET_ENABLED
|
{configs.IS_MAINNET_ENABLED
|
||||||
? ` or ${constants.MAINNET_NAME} (network Id: ${constants.NETWORK_ID_MAINNET}).`
|
? ` or ${constants.MAINNET_NAME} (network Id: ${constants.NETWORK_ID_MAINNET}).`
|
||||||
: `.`}
|
: `.`}
|
||||||
|
@@ -497,8 +497,8 @@ export class TokenBalances extends React.Component<TokenBalancesProps, TokenBala
|
|||||||
case BalanceErrs.incorrectNetworkForFaucet:
|
case BalanceErrs.incorrectNetworkForFaucet:
|
||||||
return (
|
return (
|
||||||
<div>
|
<div>
|
||||||
Our faucet can only send test Ether to addresses on the {Networks.kovan} testnet (networkId{' '}
|
Our faucet can only send test Ether to addresses on the {Networks.Kovan} testnet (networkId{' '}
|
||||||
{constants.NETWORK_ID_KOVAN}). Please make sure you are connected to the {Networks.kovan}{' '}
|
{constants.NETWORK_ID_KOVAN}). Please make sure you are connected to the {Networks.Kovan}{' '}
|
||||||
testnet and try requesting ether again.
|
testnet and try requesting ether again.
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
|
@@ -40,9 +40,9 @@ import { utils } from 'ts/utils/utils';
|
|||||||
const SCROLL_TOP_ID = 'docsScrollTop';
|
const SCROLL_TOP_ID = 'docsScrollTop';
|
||||||
|
|
||||||
const networkNameToColor: { [network: string]: string } = {
|
const networkNameToColor: { [network: string]: string } = {
|
||||||
[Networks.kovan]: colors.purple,
|
[Networks.Kovan]: colors.purple,
|
||||||
[Networks.ropsten]: colors.red,
|
[Networks.Ropsten]: colors.red,
|
||||||
[Networks.mainnet]: colors.turquois,
|
[Networks.Mainnet]: colors.turquois,
|
||||||
};
|
};
|
||||||
|
|
||||||
export interface DocumentationAllProps {
|
export interface DocumentationAllProps {
|
||||||
|
@@ -592,10 +592,10 @@ export interface AddressByContractName {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export enum Networks {
|
export enum Networks {
|
||||||
mainnet = 'Mainnet',
|
Mainnet = 'Mainnet',
|
||||||
kovan = 'Kovan',
|
Kovan = 'Kovan',
|
||||||
ropsten = 'Ropsten',
|
Ropsten = 'Ropsten',
|
||||||
rinkeby = 'Rinkeby',
|
Rinkeby = 'Rinkeby',
|
||||||
}
|
}
|
||||||
|
|
||||||
export enum AbiTypes {
|
export enum AbiTypes {
|
||||||
|
@@ -21,19 +21,19 @@ export const configs = {
|
|||||||
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
|
BITLY_ACCESS_TOKEN: 'ffc4c1a31e5143848fb7c523b39f91b9b213d208',
|
||||||
CONTRACT_ADDRESS: {
|
CONTRACT_ADDRESS: {
|
||||||
'1.0.0': {
|
'1.0.0': {
|
||||||
[Networks.mainnet]: {
|
[Networks.Mainnet]: {
|
||||||
[SmartContractDocSections.Exchange]: '0x12459c951127e0c374ff9105dda097662a027093',
|
[SmartContractDocSections.Exchange]: '0x12459c951127e0c374ff9105dda097662a027093',
|
||||||
[SmartContractDocSections.TokenTransferProxy]: '0x8da0d80f5007ef1e431dd2127178d224e32c2ef4',
|
[SmartContractDocSections.TokenTransferProxy]: '0x8da0d80f5007ef1e431dd2127178d224e32c2ef4',
|
||||||
[SmartContractDocSections.ZRXToken]: '0xe41d2489571d322189246dafa5ebde1f4699f498',
|
[SmartContractDocSections.ZRXToken]: '0xe41d2489571d322189246dafa5ebde1f4699f498',
|
||||||
[SmartContractDocSections.TokenRegistry]: '0x926a74c5c36adf004c87399e65f75628b0f98d2c',
|
[SmartContractDocSections.TokenRegistry]: '0x926a74c5c36adf004c87399e65f75628b0f98d2c',
|
||||||
},
|
},
|
||||||
[Networks.ropsten]: {
|
[Networks.Ropsten]: {
|
||||||
[SmartContractDocSections.Exchange]: '0x479cc461fecd078f766ecc58533d6f69580cf3ac',
|
[SmartContractDocSections.Exchange]: '0x479cc461fecd078f766ecc58533d6f69580cf3ac',
|
||||||
[SmartContractDocSections.TokenTransferProxy]: '0x4e9aad8184de8833365fea970cd9149372fdf1e6',
|
[SmartContractDocSections.TokenTransferProxy]: '0x4e9aad8184de8833365fea970cd9149372fdf1e6',
|
||||||
[SmartContractDocSections.ZRXToken]: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d',
|
[SmartContractDocSections.ZRXToken]: '0xa8e9fa8f91e5ae138c74648c9c304f1c75003a8d',
|
||||||
[SmartContractDocSections.TokenRegistry]: '0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed',
|
[SmartContractDocSections.TokenRegistry]: '0x6b1a50f0bb5a7995444bd3877b22dc89c62843ed',
|
||||||
},
|
},
|
||||||
[Networks.kovan]: {
|
[Networks.Kovan]: {
|
||||||
[SmartContractDocSections.Exchange]: '0x90fe2af704b34e0224bf2299c838e04d4dcf1364',
|
[SmartContractDocSections.Exchange]: '0x90fe2af704b34e0224bf2299c838e04d4dcf1364',
|
||||||
[SmartContractDocSections.TokenTransferProxy]: '0x087Eed4Bc1ee3DE49BeFbd66C662B434B15d49d4',
|
[SmartContractDocSections.TokenTransferProxy]: '0x087Eed4Bc1ee3DE49BeFbd66C662B434B15d49d4',
|
||||||
[SmartContractDocSections.ZRXToken]: '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570',
|
[SmartContractDocSections.ZRXToken]: '0x6ff6c0ff1d68b964901f986d4c9fa3ac68346570',
|
||||||
|
@@ -24,16 +24,16 @@ export const constants = {
|
|||||||
NETWORK_ID_KOVAN: 42,
|
NETWORK_ID_KOVAN: 42,
|
||||||
NETWORK_ID_TESTRPC: 50,
|
NETWORK_ID_TESTRPC: 50,
|
||||||
NETWORK_NAME_BY_ID: {
|
NETWORK_NAME_BY_ID: {
|
||||||
1: Networks.mainnet,
|
1: Networks.Mainnet,
|
||||||
3: Networks.ropsten,
|
3: Networks.Ropsten,
|
||||||
4: Networks.rinkeby,
|
4: Networks.Rinkeby,
|
||||||
42: Networks.kovan,
|
42: Networks.Kovan,
|
||||||
} as { [symbol: number]: string },
|
} as { [symbol: number]: string },
|
||||||
NETWORK_ID_BY_NAME: {
|
NETWORK_ID_BY_NAME: {
|
||||||
[Networks.mainnet]: 1,
|
[Networks.Mainnet]: 1,
|
||||||
[Networks.ropsten]: 3,
|
[Networks.Ropsten]: 3,
|
||||||
[Networks.rinkeby]: 4,
|
[Networks.Rinkeby]: 4,
|
||||||
[Networks.kovan]: 42,
|
[Networks.Kovan]: 42,
|
||||||
} as { [networkName: string]: number },
|
} as { [networkName: string]: number },
|
||||||
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
NULL_ADDRESS: '0x0000000000000000000000000000000000000000',
|
||||||
PROVIDER_NAME_LEDGER: 'Ledger',
|
PROVIDER_NAME_LEDGER: 'Ledger',
|
||||||
|
@@ -151,7 +151,7 @@ export const utils = {
|
|||||||
if (_.isUndefined(networkName)) {
|
if (_.isUndefined(networkName)) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
const etherScanPrefix = networkName === Networks.mainnet ? '' : `${networkName.toLowerCase()}.`;
|
const etherScanPrefix = networkName === Networks.Mainnet ? '' : `${networkName.toLowerCase()}.`;
|
||||||
return `https://${etherScanPrefix}etherscan.io/${suffix}/${addressOrTxHash}`;
|
return `https://${etherScanPrefix}etherscan.io/${suffix}/${addressOrTxHash}`;
|
||||||
},
|
},
|
||||||
setUrlHash(anchorId: string) {
|
setUrlHash(anchorId: string) {
|
||||||
|
Reference in New Issue
Block a user