-
Notifications
You must be signed in to change notification settings - Fork 42
Expand file tree
/
Copy pathcontext.ts
More file actions
77 lines (70 loc) · 2.31 KB
/
context.ts
File metadata and controls
77 lines (70 loc) · 2.31 KB
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
import { ProgressHookType, PushAPI } from '@pushprotocol/restapi';
import { ConnectedUser } from './chat';
export interface Web3NameListType {
[key: string]: string;
}
export interface onboardingProgressI {
enabled: boolean;
hookInfo: ProgressHookType;
spinnerType: number;
progress: number;
errorMessage?: string;
}
export interface BlockedLoadingI {
enabled: boolean;
title: string;
spinnerEnabled?: boolean;
spinnerSize?: number;
spinnerType?: number;
progressEnabled?: boolean;
progress?: number;
progressNotice?: string;
errorMessage?: string;
}
export interface LocalPeerType {
peer: string;
peerID: string;
}
export interface ConnectedPeerIDType {
peerID: string;
}
export type handleConnectWalletAndEnableProfileProps = {
showToast?: boolean;
toastMessage?: string;
wallet?: any;
remember?: boolean;
};
export interface AppContextType {
web3NameList: Web3NameListType;
setWeb3NameList: (ens: Web3NameListType) => void;
MetamaskPushSnapModalComponent: any;
showMetamaskPushSnap: () => void;
SnapState: number;
setSnapState: (SnapState: number) => void;
initializePushSDK: () => Promise<void>;
snapInstalled: boolean;
setSnapInstalled: (snapInstalled: boolean) => void;
handleConnectWalletAndEnableProfile: (props: handleConnectWalletAndEnableProfileProps) => Promise<PushAPI>;
connectWallet: (showToast?: boolean, toastMessage?: string) => any;
setBlockedLoading: (blockedLoading: BlockedLoadingI) => void;
blockedLoading: BlockedLoadingI;
getUser: () => Promise<void>;
connectedUser: ConnectedUser;
setConnectedUser: (connectedUser: ConnectedUser) => void;
pgpPvtKey: string;
setPgpPvtKey: (pgpPvtKey: string) => void;
localPeer: LocalPeerType;
setLocalPeer: (localPeer: LocalPeerType) => void;
connectedPeerID: ConnectedPeerIDType;
setConnectedPeerID: (connectedPeerID: ConnectedPeerIDType) => void;
displayQR: boolean;
setDisplayQR: (displayQR: boolean) => void;
createUserIfNecessary: () => Promise<ConnectedUser>;
initializePushSdkReadMode: () => Promise<void>;
isUserProfileUnlocked: boolean;
setUserProfileUnlocked: (isUserProfileUnlocked: boolean) => void;
newChatsCount: number;
setNewChatsCount: React.Dispatch<React.SetStateAction<number>>;
newNotifsCount: number;
setNewNotifsCount: React.Dispatch<React.SetStateAction<number>>;
}