-
Notifications
You must be signed in to change notification settings - Fork 9
/
type.ts
55 lines (48 loc) · 1.25 KB
/
type.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import { CoreTypes } from '@walletconnect/types';
export const WALLETCONNECT_STATUS_MAP = {
PENDING: 1,
CONNECTED: 2,
WAITING: 3,
SIBMITTED: 4,
REJECTED: 5,
FAILD: 6
};
export const WALLETCONNECT_SESSION_STATUS_MAP = {
CONNECTED: 'CONNECTED',
DISCONNECTED: 'DISCONNECTED',
RECEIVED: 'RECEIVED',
EXPIRED: 'EXPIRED',
ACCOUNT_ERROR: 'ACCOUNT_ERROR',
BRAND_NAME_ERROR: 'BRAND_NAME_ERROR',
REJECTED: 'REJECTED',
ADDRESS_DUPLICATE: 'ADDRESS_DUPLICATE'
};
export interface Account {
brandName: string;
address: string;
realBrandName?: string;
realBrandUrl?: string;
}
export interface ConstructorOptions {
accounts?: Account[];
brandName?: string;
clientMeta: CoreTypes.Metadata;
maxDuration?: number;
projectId: string;
v2Whitelist: string[];
chains: number[];
}
export const COMMON_WALLETCONNECT = ['WALLETCONNECT', 'WalletConnect'];
export const BuildInWalletPeerName = {
MetaMask: 'MetaMask',
TP: 'TokenPocket',
TRUSTWALLET: 'Trust Wallet',
MATHWALLET: 'MathWallet',
IMTOKEN: 'imToken',
Rainbow: 'Rainbow',
Bitkeep: 'Bitget',
Uniswap: 'Uniswap',
Zerion: 'Zerion'
};
export const buildInWallets = Object.keys(BuildInWalletPeerName);
export const IGNORE_CHECK_WALLET = ['FIREBLOCKS', 'JADE', 'AMBER', 'COBO'];