@@ -1,7 +1,7 @@
1import create from 'zustand';
1import create from 'zustand';
2import { L2Point, PendingTransaction, Ownership } from '@urbit/roller-api';
2import { L2Point, PendingTransaction, Ownership } from '@urbit/roller-api';
4−import { HOUR, isL2 } from 'lib/utils/roller';
4+import { HOUR, isL2, isL2Spawn } from 'lib/utils/roller';
5import { increaseProxyNonce, setProxyNonce } from 'lib/utils/nonce';
5import { increaseProxyNonce, setProxyNonce } from 'lib/utils/nonce';
6import { Invite } from 'lib/types/Invite';
6import { Invite } from 'lib/types/Invite';
@@ -11,6 +11,7 @@ export interface RollerStore {
11 pendingTransactions: PendingTransaction[];
11 pendingTransactions: PendingTransaction[];
12 currentPoint: L2Point | null;
12 currentPoint: L2Point | null;
13 currentL2: boolean;
13 currentL2: boolean;
14+ currentL2Spawn: boolean;
15 [point: number]: Ownership;
16 [point: number]: Ownership;
@@ -37,6 +38,7 @@ export const useRollerStore = create<RollerStore>(set => ({
37 pendingTransactions: [],
38 pendingTransactions: [],
38 currentPoint: null,
39 currentPoint: null,
39 currentL2: false,
40 currentL2: false,
41+ currentL2Spawn: false,
40 invites: [],
42 invites: [],
41 recentlyCompleted: 0,
43 recentlyCompleted: 0,
42 nonces: {},
44 nonces: {},
@@ -51,7 +53,10 @@ export const useRollerStore = create<RollerStore>(set => ({
51 set(state => {
53 set(state => {
52 const updatedOwner = setProxyNonce(owner, proxy, nonce);
54 const updatedOwner = setProxyNonce(owner, proxy, nonce);
53 if (!updatedOwner) throw new Error("Can't set nonce for this proxy");
55 if (!updatedOwner) throw new Error("Can't set nonce for this proxy");
54− return { ...state, nonces: { ...state.nonces, [point]: updatedOwner } };
58+ nonces: { ...state.nonces, [point]: updatedOwner },
56 setNonces: (point: number, owner: Ownership) =>
61 setNonces: (point: number, owner: Ownership) =>
57 set(state => {
62 set(state => {
@@ -75,6 +80,7 @@ export const useRollerStore = create<RollerStore>(set => ({
75 set(() => ({
80 set(() => ({
76 currentPoint,
81 currentPoint,
77 currentL2: isL2(currentPoint?.dominion),
82 currentL2: isL2(currentPoint?.dominion),
83+ currentL2Spawn: isL2Spawn(currentPoint?.dominion),
79 setInvites: (invites: Invite[]) => set(() => ({ invites })),
85 setInvites: (invites: Invite[]) => set(() => ({ invites })),