aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/ts/components
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-03-25 08:22:06 +0800
committerFabio Berger <me@fabioberger.com>2018-03-25 08:22:06 +0800
commit109fc41474f5319a27052ab09234cc0426eb22ce (patch)
tree3017f330b9edc39b1da06439e796ba00c103735f /packages/website/ts/components
parentbed7d87b7ff64989051e6b2115a1c77e1e72ff55 (diff)
downloaddexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar.gz
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar.bz2
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar.lz
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar.xz
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.tar.zst
dexon-sol-tools-109fc41474f5319a27052ab09234cc0426eb22ce.zip
Add error popover if TokenRegistry on network user is browsing on don't include the requisite default tokens for 0x Portal to function
Diffstat (limited to 'packages/website/ts/components')
-rw-r--r--packages/website/ts/components/dialogs/blockchain_err_dialog.tsx14
1 files changed, 14 insertions, 0 deletions
diff --git a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
index e71a0f7d1..1c3b7458d 100644
--- a/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
+++ b/packages/website/ts/components/dialogs/blockchain_err_dialog.tsx
@@ -52,6 +52,8 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
return 'Enable wallet communication';
} else if (this.props.blockchainErr === BlockchainErrs.DisconnectedFromEthereumNode) {
return 'Disconnected from Ethereum network';
+ } else if (this.props.blockchainErr === BlockchainErrs.DefaultTokensNotInTokenRegistry) {
+ return 'Default TokenRegistry tokens missing';
} else {
return 'Unexpected error';
}
@@ -63,6 +65,8 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
return this._renderNoWalletFoundExplanation();
} else if (this.props.blockchainErr === BlockchainErrs.DisconnectedFromEthereumNode) {
return this._renderDisconnectedFromNode();
+ } else if (this.props.blockchainErr === BlockchainErrs.DefaultTokensNotInTokenRegistry) {
+ return this._renderDefaultTokenNotInTokenRegistry();
} else {
return this._renderUnexpectedErrorExplanation();
}
@@ -82,6 +86,16 @@ export class BlockchainErrDialog extends React.Component<BlockchainErrDialogProp
</div>
);
}
+ private _renderDefaultTokenNotInTokenRegistry() {
+ return (
+ <div>
+ The TokenRegistry deployed on your network does not contain the needed default tokens for 0x Portal to
+ operate. Please try one of the supported networks (Mainnet, Kovan, Ropsten, Rinkeby). If on a local
+ Testnet, make sure the TokenRegistry contract is deployed and loaded with some default tokens (i.e WETH
+ & ZRX).
+ </div>
+ );
+ }
private _renderUnexpectedErrorExplanation() {
return <div>We encountered an unexpected error. Please try refreshing the page.</div>;
}