@@ -1,7 +1,7 @@
11import create from 'zustand';
22import { L2Point, PendingTransaction, Ownership } from '@urbit/roller-api';
33
4−import { HOUR, isL2 } from 'lib/utils/roller';
4+import { HOUR, isL2, isL2Spawn } from 'lib/utils/roller';
55import { increaseProxyNonce, setProxyNonce } from 'lib/utils/nonce';
66import { Invite } from 'lib/types/Invite';
77
@@ -11,6 +11,7 @@ export interface RollerStore {
1111 pendingTransactions: PendingTransaction[];
1212 currentPoint: L2Point | null;
1313 currentL2: boolean;
14+ currentL2Spawn: boolean;
1415 nonces: {
1516 [point: number]: Ownership;
1617 };
@@ -37,6 +38,7 @@ export const useRollerStore = create<RollerStore>(set => ({
3738 pendingTransactions: [],
3839 currentPoint: null,
3940 currentL2: false,
41+ currentL2Spawn: false,
4042 invites: [],
4143 recentlyCompleted: 0,
4244 nonces: {},
@@ -51,7 +53,10 @@ export const useRollerStore = create<RollerStore>(set => ({
5153 set(state => {
5254 const updatedOwner = setProxyNonce(owner, proxy, nonce);
5355 if (!updatedOwner) throw new Error("Can't set nonce for this proxy");
54− return { ...state, nonces: { ...state.nonces, [point]: updatedOwner } };
56+ return {
57+ ...state,
58+ nonces: { ...state.nonces, [point]: updatedOwner },
59+ };
5560 }),
5661 setNonces: (point: number, owner: Ownership) =>
5762 set(state => {
@@ -75,6 +80,7 @@ export const useRollerStore = create<RollerStore>(set => ({
7580 set(() => ({
7681 currentPoint,
7782 currentL2: isL2(currentPoint?.dominion),
83+ currentL2Spawn: isL2Spawn(currentPoint?.dominion),
7884 })),
7985 setInvites: (invites: Invite[]) => set(() => ({ invites })),
8086}));