@@ -7,7 +7,7 @@ import React, {
8} from 'react';
8} from 'react';
9import { Just, Nothing } from 'folktale/maybe';
9import { Just, Nothing } from 'folktale/maybe';
10−import { includes } from 'lodash';
10+import { includes, noop } from 'lodash';
11import { randomHex } from 'web3-utils';
11import { randomHex } from 'web3-utils';
13import { walletFromMnemonic } from 'lib/wallet';
13import { walletFromMnemonic } from 'lib/wallet';
@@ -22,7 +22,39 @@ import { BRIDGE_ERROR } from 'lib/error';
22import { useNetwork } from 'store/network';
22import { useNetwork } from 'store/network';
23import { publicToAddress } from 'lib/utils/address';
23import { publicToAddress } from 'lib/utils/address';
25+const initialContext = {
27+ walletType: Nothing(),
31+ setWalletHdPath: noop,
36+ urbitWallet: Nothing(),
37+ setUrbitWallet: noop,
38+ authMnemonic: Nothing(),
39+ setAuthMnemonic: noop,
41+ networkSeed: Nothing(),
42+ setNetworkSeed: noop,
43+ networkRevision: Nothing(),
44+ setNetworkRevision: noop,
48+ authToken: Nothing(),
50+ useLegacyTokenSigning: Nothing(),
51+ setUseLegacyTokenSigning: noop,
52+ skipLoginSigning: false,
53+ setSkipLoginSigning: noop,
25−export const WalletContext = createContext(null);
57+export const WalletContext = createContext(initialContext);
27const DEFAULT_WALLET_TYPE = WALLET_TYPES.TICKET;
59const DEFAULT_WALLET_TYPE = WALLET_TYPES.TICKET;