diff options
author | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-17 08:21:38 +0800 |
---|---|---|
committer | Steve Klebanoff <steve.klebanoff@gmail.com> | 2018-11-17 08:21:38 +0800 |
commit | 097bfe581dff6ff77e3cf19a03138743ae13868e (patch) | |
tree | 1b840216a9343100ab2640f78d94ab1e68b6a480 /packages | |
parent | 1564415e5dc29cd76ac17f679ed83e0973764153 (diff) | |
download | dexon-sol-tools-097bfe581dff6ff77e3cf19a03138743ae13868e.tar.gz dexon-sol-tools-097bfe581dff6ff77e3cf19a03138743ae13868e.tar.zst dexon-sol-tools-097bfe581dff6ff77e3cf19a03138743ae13868e.zip |
Better way of reporting Fallback provider
Diffstat (limited to 'packages')
-rw-r--r-- | packages/instant/src/util/env.ts | 2 | ||||
-rw-r--r-- | packages/instant/src/util/provider_factory.ts | 4 | ||||
-rw-r--r-- | packages/instant/src/util/provider_state_factory.ts | 2 |
3 files changed, 1 insertions, 7 deletions
diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts index 59b47d1e3..4a32f9cb1 100644 --- a/packages/instant/src/util/env.ts +++ b/packages/instant/src/util/env.ts @@ -52,8 +52,6 @@ export const envUtil = { return ProviderType.CoinbaseWallet; } else if (!_.isUndefined(_.get(window, '__CIPHER__'))) { return ProviderType.Cipher; - } else if ((provider as any).zeroExInstantFallbackEngine) { - return ProviderType.Fallback; } return; }, diff --git a/packages/instant/src/util/provider_factory.ts b/packages/instant/src/util/provider_factory.ts index d77407521..603f7674d 100644 --- a/packages/instant/src/util/provider_factory.ts +++ b/packages/instant/src/util/provider_factory.ts @@ -29,10 +29,6 @@ export const providerFactory = { providerEngine.addProvider(new RPCSubprovider(rpcUrl)); // // Start the Provider Engine providerEngine.start(); - // This feels a bit dirty, but was the only way I could think of - // checking to see if this engine is our fallback engine, and not - // another Web3Provider engine provided by some dapp browser - (providerEngine as any).zeroExInstantFallbackEngine = true; return providerEngine; }, }; diff --git a/packages/instant/src/util/provider_state_factory.ts b/packages/instant/src/util/provider_state_factory.ts index 452a71460..7c788dff2 100644 --- a/packages/instant/src/util/provider_state_factory.ts +++ b/packages/instant/src/util/provider_state_factory.ts @@ -56,7 +56,7 @@ export const providerStateFactory = { getInitialProviderStateFallback: (orderSource: OrderSource, network: Network): ProviderState => { const provider = providerFactory.getFallbackNoSigningProvider(network); const providerState: ProviderState = { - name: envUtil.getProviderName(provider), + name: 'Fallback', provider, web3Wrapper: new Web3Wrapper(provider), assetBuyer: assetBuyerFactory.getAssetBuyer(provider, orderSource, network), |