@@ -27,7 +27,6 @@ import {
2727 generateInviteWallet,
2828 getPendingSpawns,
2929 submitL2Transaction,
30− getTimeToNextBatch,
3130 registerProxyAddress,
3231 isL2Spawn,
3332} from './utils/roller';
@@ -44,7 +43,6 @@ import {
4443} from '@urbit/roller-api';
4544
4645import Point, { PointField, Points } from './types/Point';
47−import { useTimerStore } from 'store/timerStore';
4846import { ReticketParams, SendL2Params } from './types/L2Transaction';
4947import { L1Point } from './types/L1Point';
5048import { ddmmmYYYY } from './utils/date';
@@ -53,8 +51,6 @@ import { useWalletConnect } from './useWalletConnect';
5351import { PendingL1Txn } from './types/PendingL1Transaction';
5452import { TRANSACTION_PROGRESS } from './reticket';
5553
56−const ONE_SECOND = 1000;
57−
5854interface UpdateParams {
5955 point: number;
6056 message?: string;
@@ -90,11 +86,8 @@ export default function useRoller() {
9086 const allPoints: any = usePointCache();
9187 const getDetails = allPoints?.getDetails;
9288
93− const { setNextRoll } = useTimerStore();
94−
9589 const {
9690 invitesLoading,
97− nextBatchTime,
9891 point,
9992 points,
10093 pointList,
@@ -1050,31 +1043,6 @@ export default function useRoller() {
10501043 fetchConfig();
10511044 }, [config, fetchConfig]);
10521045
1053− useEffect(() => {
1054− const time = ONE_SECOND;
1055−
1056− const interval = setInterval(() => {
1057− const nextRoll = getTimeToNextBatch(nextBatchTime, new Date().getTime());
1058− setNextRoll(nextRoll);
1059−
1060− if (nextBatchTime - ONE_SECOND <= new Date().getTime()) {
1061− api.getRollerConfig().then(response => {
1062− setNextBatchTime(response.nextBatch);
1063− });
1064−
1065− getPendingTransactions();
1066−
1067− setTimeout(() => {
1068− if (!point.isDefault) {
1069− getInvites(); // This will also get pending txns
1070− }
1071− }, TEN_SECONDS); // Should this be more like a minute?
1072− }
1073− }, time);
1074−
1075− return () => clearInterval(interval);
1076− }, [point, nextBatchTime, getPendingTransactions, getInvites]); // eslint-disable-line react-hooks/exhaustive-deps
1077−
10781046 return {
10791047 api,
10801048 changeSponsorship,