@@ -157,7 +157,7 @@ export default function useRoller() {
159 const fetchConfig = useCallback(async () => {
159 const fetchConfig = useCallback(async () => {
160− getNextQuotaTime(1);
160+ getNextQuotaTime(Date.now() + 1000);
162 .getRollerConfig()
162 .getRollerConfig()
163 .then(config => {
163 .then(config => {
@@ -177,12 +177,12 @@ export default function useRoller() {
177 if (point.l2Quota <= 0) {
177 if (point.l2Quota <= 0) {
178 setModalText(
178 setModalText(
179 `You have reached your weekly L2 transaction limit. You will get another
179 `You have reached your weekly L2 transaction limit. You will get another
180− ${config?.rollerQuota} transactions on ${ddmmmYYYY(nextQuotaTime)}.`
180+ ${point.l2Allowance} transactions on ${ddmmmYYYY(nextQuotaTime)}.`
184 return point.l2Quota <= 0;
184 return point.l2Quota <= 0;
185− }, [config, nextQuotaTime, point, setModalText]);
185+ }, [nextQuotaTime, point, setModalText]);
187 const initPoint = useCallback(
187 const initPoint = useCallback(
188 async (point: string | number) => {
188 async (point: string | number) => {
@@ -196,9 +196,9 @@ export default function useRoller() {
196 const pointNum = Number(point);
196 const pointNum = Number(point);
198 const rawDetails = await api.getPoint(pointNum);
198 const rawDetails = await api.getPoint(pointNum);
199− const l2Quota = isL2Spawn(rawDetails?.dominion)
199+ const isL2 = isL2Spawn(rawDetails?.dominion);
200− ? await api.getRemainingQuota(pointNum)
200+ const l2Quota = isL2 ? await api.getRemainingQuota(pointNum) : 0;
201− : 0;
201+ const l2Allowance = isL2 ? await api.getAllowance(pointNum) : 0;
203 const details = isL2Spawn(rawDetails?.dominion)
203 const details = isL2Spawn(rawDetails?.dominion)
204 ? toL1Details(rawDetails)
204 ? toL1Details(rawDetails)
@@ -209,6 +209,7 @@ export default function useRoller() {
210 address: _wallet.address,
210 address: _wallet.address,
213 } catch (e) {
214 } catch (e) {
214 console.warn(e);
215 console.warn(e);