@@ -42,23 +42,29 @@ function _useWallet(
4242 const [networkSeed, setNetworkSeed] = useState(Maybe.Nothing());
4343 const [networkRevision, setNetworkRevision] = useState(Maybe.Nothing());
4444
45− const setWalletType = useCallback(walletType => {
46− if (!includes(WALLET_TYPES, walletType)) {
47− throw BRIDGE_ERROR.INVALID_WALLET_TYPE;
48− }
49−
50− _setWalletType(walletType);
51− }, []);
52−
53− const setWallet = useCallback(wallet => {
54− // force that public addresses are derived for each wallet
55− wallet.map(wal => {
56− wal.address = wal.address || addressFromSecp256k1Public(wal.publicKey);
57− return wal;
58− });
59−
60− _setWallet(wallet);
61− }, []);
45+ const setWalletType = useCallback(
46+ walletType => {
47+ if (!includes(WALLET_TYPES, walletType)) {
48+ throw BRIDGE_ERROR.INVALID_WALLET_TYPE;
49+ }
50+
51+ _setWalletType(walletType);
52+ },
53+ [_setWalletType]
54+ );
55+
56+ const setWallet = useCallback(
57+ wallet => {
58+ // force that public addresses are derived for each wallet
59+ wallet.map(wal => {
60+ wal.address = wal.address || addressFromSecp256k1Public(wal.publicKey);
61+ return wal;
62+ });
63+
64+ _setWallet(wallet);
65+ },
66+ [_setWallet]
67+ );
6268
6369 const setUrbitWallet = useCallback(
6470 urbitWallet => {