@@ -33,6 +33,7 @@ import {
3333 adopt,
3434 detach,
3535 reject,
36+ isL2Spawn,
3637} from './utils/roller';
3738import { ETH_ZERO_ADDR, ROLLER_HOSTS, TEN_SECONDS } from './constants';
3839
@@ -51,6 +52,7 @@ import { useTimerStore } from 'store/timerStore';
5152import { ReticketParams, SendL2Params } from './types/L2Transaction';
5253import { L1Point } from './types/L1Point';
5354import { ddmmmYYYY } from './utils/date';
55+import { showNotification } from './utils/notifications';
5456import { useWalletConnect } from './useWalletConnect';
5557
5658const ONE_SECOND = 1000;
@@ -190,10 +192,9 @@ export default function useRoller() {
190192 const pointNum = Number(point);
191193 try {
192194 const rawDetails = await api.getPoint(pointNum);
193− const l2Quota =
194− rawDetails?.dominion === 'l2'
195− ? await api.getRemainingQuota(pointNum)
196− : 0;
195+ const l2Quota = isL2Spawn(rawDetails?.dominion)
196+ ? await api.getRemainingQuota(pointNum)
197+ : 0;
197198 const details = toL1Details(rawDetails);
198199
199200 return new Point({
@@ -246,8 +247,8 @@ export default function useRoller() {
246247 if (!updatedPoint.isPlaceholder && changedField) {
247248 updatePoint(updatedPoint);
248249 clearInterval(interval);
249− if (Notification?.permission === 'granted' && notify) {
250− new Notification(
250+ if (notify) {
251+ showNotification(
251252 `${message || getUpdatedPointMessage(updatedPoint, changedField)}`
252253 );
253254 }
@@ -530,6 +531,9 @@ export default function useRoller() {
530531
531532 setStoredInvites(ls, invites);
532533 getInvites();
534+ showNotification(
535+ `Your invite${invites.length > 1 ? 's have' : ' has'} been generated!`
536+ );
533537 },
534538 [
535539 api,
@@ -996,7 +1000,7 @@ export default function useRoller() {
9961000 }, [config, fetchConfig]);
9971001
9981002 useEffect(() => {
999− const time = isDevelopment ? 10000 : ONE_SECOND;
1003+ const time = ONE_SECOND;
10001004
10011005 const interval = setInterval(() => {
10021006 const nextRoll = getTimeToNextBatch(nextBatchTime, new Date().getTime());
@@ -1010,10 +1014,8 @@ export default function useRoller() {
10101014 getPendingTransactions();
10111015
10121016 setTimeout(() => {
1013− getPendingTransactions();
1014−
10151017 if (!point.isDefault) {
1016− getInvites();
1018+ getInvites(); // This will also get pending txns
10171019 }
10181020 }, TEN_SECONDS); // Should this be more like a minute?
10191021 }