@@ -44,7 +44,7 @@ import { useRollerOptions } from './useRollerOptions';
44import { useTimerStore } from 'store/timerStore';
44import { useTimerStore } from 'store/timerStore';
46interface UpdateParams {
46interface UpdateParams {
47− point: number;
47+ point?: Point | number;
48 message?: string;
48 message?: string;
49 notify?: boolean;
49 notify?: boolean;
50 field?: PointField;
50 field?: PointField;
@@ -140,7 +140,7 @@ export default function useRoller() {
140 }, [nextQuotaTime, point, setModalText]);
140 }, [nextQuotaTime, point, setModalText]);
142 const initPoint = useCallback(
142 const initPoint = useCallback(
143− async (point: string | number) => {
143+ async (point: string | number): Promise<Point> => {
144 const _wallet = wallet.getOrElse(null);
144 const _wallet = wallet.getOrElse(null);
145 const _contracts = contracts.getOrElse(null);
145 const _contracts = contracts.getOrElse(null);
@@ -211,21 +211,24 @@ export default function useRoller() {
212 intervalTime = TEN_SECONDS,
212 intervalTime = TEN_SECONDS,
213 }: UpdateParams) => {
213 }: UpdateParams) => {
216+ const p = (typeof point === 'number' ? await initPoint(point) : point) as Point
214 if (l1Txn) storePendingL1Txn(l1Txn);
218 if (l1Txn) storePendingL1Txn(l1Txn);
216 let interval: any;
220 let interval: any;
217 const check = async () => {
221 const check = async () => {
218− const updatedPoint = await initPoint(point);
219− const changedField = !points[point]
222+ const changedField = !points[p.value]
220 ? 'newPoint'
223 ? 'newPoint'
221− : updatedPoint.getChangedField(points[point], field);
224+ : p.getChangedField(points[p.value], field);
223 if (isDevelopment) {
226 if (isDevelopment) {
224− console.log(`CHECKING FOR ${changedField} UPDATES:`, updatedPoint);
227+ console.log(`CHECKING FOR ${changedField} UPDATES:`, p.patp);
227− if (!updatedPoint.isPlaceholder && changedField) {
230+ if (!p.isPlaceholder && changedField) {
228− updatePoint(updatedPoint);
231+ updatePoint(p);
229 if (interval) {
232 if (interval) {
230 clearInterval(interval);
233 clearInterval(interval);
@@ -233,7 +236,7 @@ export default function useRoller() {
233 if (l1Txn) deletePendingL1Txn(l1Txn);
236 if (l1Txn) deletePendingL1Txn(l1Txn);
234 if (notify) {
237 if (notify) {
235 showNotification(
238 showNotification(
236− `${message || getUpdatedPointMessage(updatedPoint, changedField)}`
239+ `${message || getUpdatedPointMessage(p, changedField)}`