@@ -27,7 +27,6 @@ import {
27 generateInviteWallet,
27 generateInviteWallet,
28 getPendingSpawns,
28 getPendingSpawns,
29 submitL2Transaction,
29 submitL2Transaction,
31 registerProxyAddress,
30 registerProxyAddress,
32 isL2Spawn,
31 isL2Spawn,
33} from './utils/roller';
32} from './utils/roller';
@@ -44,7 +43,6 @@ import {
44} from '@urbit/roller-api';
43} from '@urbit/roller-api';
46import Point, { PointField, Points } from './types/Point';
45import Point, { PointField, Points } from './types/Point';
47−import { useTimerStore } from 'store/timerStore';
48import { ReticketParams, SendL2Params } from './types/L2Transaction';
46import { ReticketParams, SendL2Params } from './types/L2Transaction';
49import { L1Point } from './types/L1Point';
47import { L1Point } from './types/L1Point';
50import { ddmmmYYYY } from './utils/date';
48import { ddmmmYYYY } from './utils/date';
@@ -53,8 +51,6 @@ import { useWalletConnect } from './useWalletConnect';
53import { PendingL1Txn } from './types/PendingL1Transaction';
51import { PendingL1Txn } from './types/PendingL1Transaction';
54import { TRANSACTION_PROGRESS } from './reticket';
52import { TRANSACTION_PROGRESS } from './reticket';
56−const ONE_SECOND = 1000;
58interface UpdateParams {
54interface UpdateParams {
59 point: number;
55 point: number;
60 message?: string;
56 message?: string;
@@ -90,11 +86,8 @@ export default function useRoller() {
90 const allPoints: any = usePointCache();
86 const allPoints: any = usePointCache();
91 const getDetails = allPoints?.getDetails;
87 const getDetails = allPoints?.getDetails;
93− const { setNextRoll } = useTimerStore();
96 invitesLoading,
90 invitesLoading,
100 pointList,
93 pointList,
@@ -1050,31 +1043,6 @@ export default function useRoller() {
1050 fetchConfig();
1043 fetchConfig();
1051 }, [config, fetchConfig]);
1044 }, [config, fetchConfig]);
1054− const time = ONE_SECOND;
1056− const interval = setInterval(() => {
1057− const nextRoll = getTimeToNextBatch(nextBatchTime, new Date().getTime());
1058− setNextRoll(nextRoll);
1060− if (nextBatchTime - ONE_SECOND <= new Date().getTime()) {
1061− api.getRollerConfig().then(response => {
1062− setNextBatchTime(response.nextBatch);
1065− getPendingTransactions();
1068− if (!point.isDefault) {
1069− getInvites(); // This will also get pending txns
1071− }, TEN_SECONDS); // Should this be more like a minute?
1075− return () => clearInterval(interval);
1076− }, [point, nextBatchTime, getPendingTransactions, getInvites]); // eslint-disable-line react-hooks/exhaustive-deps
1078 return {
1046 return {
1080 changeSponsorship,
1048 changeSponsorship,