aboutsummaryrefslogtreecommitdiffstats
path: root/packages
diff options
context:
space:
mode:
Diffstat (limited to 'packages')
-rw-r--r--packages/instant/src/constants.ts1
-rw-r--r--packages/instant/src/types.ts1
-rw-r--r--packages/instant/src/util/env.ts2
3 files changed, 4 insertions, 0 deletions
diff --git a/packages/instant/src/constants.ts b/packages/instant/src/constants.ts
index f83eb4ac7..6d3680dc1 100644
--- a/packages/instant/src/constants.ts
+++ b/packages/instant/src/constants.ts
@@ -71,5 +71,6 @@ export const PROVIDER_TYPE_TO_NAME: { [key in ProviderType]: string } = {
[ProviderType.Mist]: 'Mist',
[ProviderType.CoinbaseWallet]: 'Coinbase Wallet',
[ProviderType.Parity]: 'Parity',
+ [ProviderType.TrustWallet]: 'Trust Wallet',
[ProviderType.Fallback]: 'Fallback',
};
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts
index 1c7490e63..6374dda09 100644
--- a/packages/instant/src/types.ts
+++ b/packages/instant/src/types.ts
@@ -176,6 +176,7 @@ export enum ProviderType {
Mist = 'MIST',
CoinbaseWallet = 'COINBASE_WALLET',
Cipher = 'CIPHER',
+ TrustWallet = 'TRUST_WALLET',
Fallback = 'FALLBACK',
}
diff --git a/packages/instant/src/util/env.ts b/packages/instant/src/util/env.ts
index 0fda0cc0e..0f0b472b2 100644
--- a/packages/instant/src/util/env.ts
+++ b/packages/instant/src/util/env.ts
@@ -44,6 +44,8 @@ export const envUtil = {
getProviderType(provider: Provider): ProviderType | undefined {
if (provider.constructor.name === 'EthereumProvider') {
return ProviderType.Mist;
+ } else if (provider.constructor.name === 'TrustWeb3Provider') {
+ return ProviderType.TrustWallet;
} else if ((provider as any).isParity) {
return ProviderType.Parity;
} else if ((provider as any).isMetaMask) {