diff options
author | fragosti <francesco.agosti93@gmail.com> | 2018-05-25 01:11:56 +0800 |
---|---|---|
committer | fragosti <francesco.agosti93@gmail.com> | 2018-05-26 03:03:18 +0800 |
commit | b49148ec54886b11042e42eed9ad4e8793840775 (patch) | |
tree | a5ee61ed5ac86de14a60fef9c00e9550b78b0474 /packages/website/ts/utils | |
parent | c7f5e77b3fe7c1805202a5b1e1e1ce1e9d31a6b0 (diff) | |
download | dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar.gz dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar.bz2 dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar.lz dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar.xz dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.tar.zst dexon-sol-tools-b49148ec54886b11042e42eed9ad4e8793840775.zip |
Implement metamask installation flow
Diffstat (limited to 'packages/website/ts/utils')
-rw-r--r-- | packages/website/ts/utils/utils.ts | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/packages/website/ts/utils/utils.ts b/packages/website/ts/utils/utils.ts index e79a873e0..1d4f7eb5c 100644 --- a/packages/website/ts/utils/utils.ts +++ b/packages/website/ts/utils/utils.ts @@ -13,6 +13,7 @@ import { Providers, ScreenWidths, Side, + ProviderType, SideToAssetToken, Token, TokenByAddress, @@ -313,6 +314,9 @@ export const utils = { isStaging(): boolean { return _.includes(window.location.href, configs.DOMAIN_STAGING); }, + isExternallyInjected(providerType: ProviderType, injectedProviderName: string): boolean { + return providerType === ProviderType.Injected && injectedProviderName !== constants.PROVIDER_NAME_PUBLIC; + }, isDogfood, shouldShowPortalV2(): boolean { return this.isDevelopment() || this.isStaging() || this.isDogfood(); |