From 46e6d890572066cf33e336966b28e7b4b7fdf21f Mon Sep 17 00:00:00 2001 From: Matthias Kretschmann Date: Thu, 13 Jun 2019 16:59:28 +0200 Subject: [PATCH] add support for Pacific network --- client/src/context/UserProvider.tsx | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/client/src/context/UserProvider.tsx b/client/src/context/UserProvider.tsx index 8f37933..60d5c03 100644 --- a/client/src/context/UserProvider.tsx +++ b/client/src/context/UserProvider.tsx @@ -153,13 +153,16 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> { await window.web3.eth.net.getId((err, netId) => { if (err) return + const isPacific = netId === 0xcea11 const isNile = netId === 8995 const isDuero = netId === 2199 const isSpree = netId === 8996 - isOceanNetwork = isNile || isDuero || isSpree + isOceanNetwork = isPacific || isNile || isDuero || isSpree - const network = isNile + const network = isPacific + ? 'Pacific' + : isNile ? 'Nile' : isDuero ? 'Duero' @@ -255,10 +258,11 @@ export default class UserProvider extends PureComponent<{}, UserProviderState> { if (isWeb3) { const network = await ocean.keeper.getNetworkName() + const isPacific = network === 'Pacific' const isNile = network === 'Nile' const isDuero = network === 'Duero' const isSpree = network === 'Spree' - const isOceanNetwork = isNile || isDuero || isSpree + const isOceanNetwork = isPacific || isNile || isDuero || isSpree network !== this.state.network && this.setState({ isOceanNetwork, network })