@@ -62,7 +62,13 @@ const inviteTemplate = (
64export default function useRoller() {
64export default function useRoller() {
65− const { wallet, authToken, authMnemonic, urbitWallet }: any = useWallet();
65+ const {
71+ }: any = useWallet();
66 const { pointCursor }: any = usePointCursor();
72 const { pointCursor }: any = usePointCursor();
67 const { web3, contracts }: any = useNetwork();
73 const { web3, contracts }: any = useNetwork();
68 const allPoints: any = usePointCache();
74 const allPoints: any = usePointCache();
@@ -189,7 +195,9 @@ export default function useRoller() {
191 nonceInc,
197 nonceInc,
195 const networkSeed = await deriveNetworkSeedFromUrbitWallet(
203 const networkSeed = await deriveNetworkSeedFromUrbitWallet(
@@ -202,7 +210,9 @@ export default function useRoller() {
205− networkSeed
213+ networkSeed,
208 const setManagementProxyRequest = registerProxyAddress(
218 const setManagementProxyRequest = registerProxyAddress(
@@ -212,7 +222,9 @@ export default function useRoller() {
213 'manage',
223 'manage',
215− inviteWallet.management.keys.address
225+ inviteWallet.management.keys.address,
218 const transferRequest = transferPointRequest(
230 const transferRequest = transferPointRequest(
@@ -221,7 +233,9 @@ export default function useRoller() {
224− inviteWallet.ownership.keys.address
236+ inviteWallet.ownership.keys.address,
227 requests.push(
241 requests.push(
@@ -248,6 +262,7 @@ export default function useRoller() {
248 contracts,
262 contracts,
249 pointCursor,
263 pointCursor,
252 getDetails,
267 getDetails,
@@ -448,8 +463,9 @@ export default function useRoller() {
448 const _point = need.point(pointCursor);
463 const _point = need.point(pointCursor);
449 const azimuthPoint = await api.getPoint(_point);
464 const azimuthPoint = await api.getPoint(_point);
450 const _wallet = wallet.getOrElse(null);
465 const _wallet = wallet.getOrElse(null);
466+ const _web3 = web3.getOrElse(null);
451 const _details = getDetails(_point);
467 const _details = getDetails(_point);
452− if (!_wallet || !_details) {
468+ if (!_wallet || !_details || !_web3) {
453 // not using need because we want a custom error
469 // not using need because we want a custom error
454 throw new Error('Internal Error: Missing Wallet/Details');
470 throw new Error('Internal Error: Missing Wallet/Details');
@@ -484,6 +500,8 @@ export default function useRoller() {
486 networkSeed,
502 networkSeed,
489 const pendingTx = await api.getPendingTx(txHash);
507 const pendingTx = await api.getPendingTx(txHash);
@@ -508,6 +526,7 @@ export default function useRoller() {
508 }: ReticketParams) => {
526 }: ReticketParams) => {
509 const azimuthPoint = await api.getPoint(point);
527 const azimuthPoint = await api.getPoint(point);
510 const proxy = 'own';
528 const proxy = 'own';
529+ const _web3 = web3.getOrElse(null);
511 let nonce = await api.getNonce({ ship: point, proxy });
530 let nonce = await api.getNonce({ ship: point, proxy });
513 let requests = [];
532 let requests = [];
@@ -525,7 +544,9 @@ export default function useRoller() {
528− networkSeed
547+ networkSeed,
530 nonce = nonce + 1;
551 nonce = nonce + 1;
531 requests.push(configureKeysRequest);
552 requests.push(configureKeysRequest);
@@ -538,7 +559,9 @@ export default function useRoller() {
539 'manage',
560 'manage',
541− manager
562+ manager,
543 nonce = nonce + 1;
566 nonce = nonce + 1;
544 requests.push(registerMgmtRequest);
567 requests.push(registerMgmtRequest);
@@ -552,7 +575,9 @@ export default function useRoller() {
555− toWallet.spawn.keys.address
578+ toWallet.spawn.keys.address,
557 nonce = nonce + 1;
582 nonce = nonce + 1;
558 requests.push(registerSpawnRequest);
583 requests.push(registerSpawnRequest);
@@ -564,7 +589,9 @@ export default function useRoller() {
569 requests.push(transferTxRequest);
596 requests.push(transferTxRequest);
@@ -576,6 +603,7 @@ export default function useRoller() {
576 async (proxyType: Proxy, address: EthAddress) => {
603 async (proxyType: Proxy, address: EthAddress) => {
577 const _point = need.point(pointCursor);
604 const _point = need.point(pointCursor);
578 const _wallet = wallet.getOrElse(null);
605 const _wallet = wallet.getOrElse(null);
606+ const _web3 = web3.getOrElse(null);
580 if (!_wallet) {
608 if (!_wallet) {
581 // not using need because we want a custom error
609 // not using need because we want a custom error
@@ -598,20 +626,23 @@ export default function useRoller() {
599 proxyType,
627 proxyType,
601− address
629+ address,
604 const pendingTx = await api.getPendingTx(txHash);
634 const pendingTx = await api.getPendingTx(txHash);
606 return pendingTx;
636 return pendingTx;
608− [api, pointCursor, wallet]
638+ [api, pointCursor, wallet, web3, walletType]
611 const transferPoint = useCallback(
641 const transferPoint = useCallback(
612 async (address: EthAddress, reset?: boolean) => {
642 async (address: EthAddress, reset?: boolean) => {
613 const _point = need.point(pointCursor);
643 const _point = need.point(pointCursor);
614 const _wallet = wallet.getOrElse(null);
644 const _wallet = wallet.getOrElse(null);
645+ const _web3 = web3.getOrElse(null);
616 if (!_wallet) {
647 if (!_wallet) {
617 // not using need because we want a custom error
648 // not using need because we want a custom error
@@ -633,13 +664,15 @@ export default function useRoller() {
636 reset || false
669 reset || false
638 const pendingTx = await api.getPendingTx(txHash);
671 const pendingTx = await api.getPendingTx(txHash);
640 return pendingTx;
673 return pendingTx;
642− [api, pointCursor, wallet]
675+ [api, pointCursor, wallet, web3, walletType]
645 // On load, get initial config
678 // On load, get initial config