@@ -7,7 +7,7 @@ import React, {
77 useEffect,
88} from 'react';
99import { Just, Nothing } from 'folktale/maybe';
10−import { includes } from 'lodash';
10+import { includes, noop } from 'lodash';
1111import { randomHex } from 'web3-utils';
1212
1313import { walletFromMnemonic } from 'lib/wallet';
@@ -22,7 +22,39 @@ import { BRIDGE_ERROR } from 'lib/error';
2222import { useNetwork } from 'store/network';
2323import { publicToAddress } from 'lib/utils/address';
2424
25−export const WalletContext = createContext(null);
25+const initialContext = {
26+ //
27+ walletType: Nothing(),
28+ setWalletType: noop,
29+ //
30+ walletHdPath: '',
31+ setWalletHdPath: noop,
32+ //
33+ wallet: Nothing(),
34+ setWallet: noop,
35+ //
36+ urbitWallet: Nothing(),
37+ setUrbitWallet: noop,
38+ authMnemonic: Nothing(),
39+ setAuthMnemonic: noop,
40+ //
41+ networkSeed: Nothing(),
42+ setNetworkSeed: noop,
43+ networkRevision: Nothing(),
44+ setNetworkRevision: noop,
45+ //
46+ resetWallet: noop,
47+ //
48+ authToken: Nothing(),
49+ setAuthToken: noop,
50+ useLegacyTokenSigning: Nothing(),
51+ setUseLegacyTokenSigning: noop,
52+ skipLoginSigning: false,
53+ setSkipLoginSigning: noop,
54+ setFakeToken: noop,
55+}
56+
57+export const WalletContext = createContext(initialContext);
2658
2759const DEFAULT_WALLET_TYPE = WALLET_TYPES.TICKET;
2860