on master help sign in
Fixing nav issue
b6873daWill Galebach
src/components/L2/Dropdowns/AccountsDropdown.tsx+1−1
@@ -128,7 +128,7 @@ const AccountsDropdown = ({ showMigrate = false }: AccountsDropdownProps) => {
128 <Box>
128 <Box>
129 {point.isStar
129 {point.isStar
130 ? point.isL2Spawn
130 ? point.isL2Spawn
131− ? 'Generate Invites'
131+ ? 'Create Invites'
132 : 'Spawn Planets'
132 : 'Spawn Planets'
133 : 'Spawn Stars'}
133 : 'Spawn Stars'}
134 </Box>
134 </Box>
src/lib/types/Point.ts+2
@@ -102,6 +102,7 @@ export default class Point {
102 isVotingProxySet: boolean;
102 isVotingProxySet: boolean;
103 isTransferProxySet: boolean;
103 isTransferProxySet: boolean;
104 canManage: boolean;
104 canManage: boolean;
105+ couldSpawn: boolean;
105 canSpawn: boolean;
106 canSpawn: boolean;
106 canTransfer: boolean;
107 canTransfer: boolean;
107 canVote: boolean;
108 canVote: boolean;
@@ -158,6 +159,7 @@ export default class Point {
158 this.isTransferProxySet = !isZeroAddress(this.transferProxy);
159 this.isTransferProxySet = !isZeroAddress(this.transferProxy);
159 this.canManage = this.isOwner || this.isManagementProxy;
160 this.canManage = this.isOwner || this.isManagementProxy;
160 this.canTransfer = this.isOwner || this.isTransferProxy;
161 this.canTransfer = this.isOwner || this.isTransferProxy;
162+ this.couldSpawn = this.isParent && (this.isOwner || this.isSpawnProxy);
161 this.canSpawn =
163 this.canSpawn =
162 this.isParent &&
164 this.isParent &&
163 (this.isOwner || this.isSpawnProxy) &&
165 (this.isOwner || this.isSpawnProxy) &&
src/store/lib/useControlledPointsStore.js+2−2
@@ -64,7 +64,7 @@ export default function useControlledPointsStore() {
64 spawningPointsL2 === null
64 spawningPointsL2 === null
65 ) {
65 ) {
66 _setControlledPoints(
66 _setControlledPoints(
67− Just(Result.Error('Failed to read the blockchain.'))
67+ JSON.stringify(Just(Result.Error('Failed to read the blockchain.')))
68 );
68 );
69 } else {
69 } else {
70 await getPointsDetails(
70 await getPointsDetails(
@@ -112,7 +112,7 @@ export default function useControlledPointsStore() {
112 }
112 }
113 } catch (error) {
113 } catch (error) {
114 console.error('failed to fetch controlled points', error);
114 console.error('failed to fetch controlled points', error);
115− _setControlledPoints(Just(Result.Error(error)));
115+ _setControlledPoints(JSON.stringify(Just(Result.Error(error))));
116 }
116 }
117 }, [contracts, wallet, getPoints, getPointsDetails]);
117 }, [contracts, wallet, getPoints, getPointsDetails]);
118
118
src/views/AcceptLockup.js+1−1
@@ -148,7 +148,7 @@ export default function AcceptLockup() {
148 full
148 full
149 as={InlineEthereumTransaction}
149 as={InlineEthereumTransaction}
150 {...bind}
150 {...bind}
151− onReturn={pop}
151+ onReturn={() => pop()}
152 />
152 />
153 </Grid>
153 </Grid>
154 </View>
154 </View>
src/views/AcceptTransfer.js+1−1
@@ -161,7 +161,7 @@ export default function AcceptTransfer() {
161 full
161 full
162 as={InlineEthereumTransaction}
162 as={InlineEthereumTransaction}
163 {...bind}
163 {...bind}
164− onReturn={pop}
164+ onReturn={() => pop()}
165 />
165 />
166 )}
166 )}
167 </Grid>
167 </Grid>
src/views/Adopt.js+1−1
@@ -80,7 +80,7 @@ export default function Adopt() {
80 full
80 full
81 {...bind}
81 {...bind}
82 as={InlineEthereumTransaction}
82 as={InlineEthereumTransaction}
83− onReturn={pop}
83+ onReturn={() => pop()}
84 />
84 />
85 </Grid>
85 </Grid>
86 </View>
86 </View>
src/views/CancelTransfer.js+1−1
@@ -119,7 +119,7 @@ function AdminCancelTransfer() {
119 full
119 full
120 as={InlineEthereumTransaction}
120 as={InlineEthereumTransaction}
121 {...bind}
121 {...bind}
122− onReturn={pop}
122+ onReturn={() => pop()}
123 />
123 />
124 )}
124 )}
125 </BodyPane>
125 </BodyPane>
src/views/CreateGalaxy.js+1−1
@@ -155,7 +155,7 @@ export default function CreateGalaxy() {
155 full
155 full
156 as={InlineEthereumTransaction}
156 as={InlineEthereumTransaction}
157 {...bind}
157 {...bind}
158− onReturn={pop}
158+ onReturn={() => pop()}
159 />
159 />
160 </>
160 </>
161 )}
161 )}
src/views/Invite/Cohort.tsx+1−1
@@ -401,7 +401,7 @@ export default function InviteCohort() {
401 as={InlineEthereumTransaction}
401 as={InlineEthereumTransaction}
402 label="Generate Planet Code"
402 label="Generate Planet Code"
403 {...bind}
403 {...bind}
404− onReturn={pop}
404+ onReturn={() => pop()}
405 />
405 />
406 )}
406 )}
407 </Box>
407 </Box>
src/views/Ops/Ops.tsx+1−1
@@ -35,7 +35,7 @@ export const Ops = () => {
35 ]);
35 ]);
36
36
37 const getButtonContent = () => {
37 const getButtonContent = () => {
38− if (!point.canSpawn) {
38+ if (!point.couldSpawn) {
39 return null;
39 return null;
40 } else if (point.networkKeysSet) {
40 } else if (point.networkKeysSet) {
41 return (
41 return (
src/views/Party/PartySetPoolSize.js+1−1
@@ -174,7 +174,7 @@ export default function PartySetPoolSize() {
174 full
174 full
175 as={InlineEthereumTransaction}
175 as={InlineEthereumTransaction}
176 {...bind}
176 {...bind}
177− onReturn={pop}
177+ onReturn={() => pop()}
178 />
178 />
179 </>
179 </>
180 )}
180 )}
src/views/Point/IssueChild.tsx+1−1
@@ -287,7 +287,7 @@ export default function IssueChild() {
287 full
287 full
288 as={InlineEthereumTransaction}
288 as={InlineEthereumTransaction}
289 {...bind}
289 {...bind}
290− onReturn={pop}
290+ onReturn={() => pop()}
291 />
291 />
292 )}
292 )}
293 </>
293 </>
src/views/Point/MigrateL2.tsx+1−1
@@ -250,7 +250,7 @@ export default function MigrateL2() {
250 transfer ? 'Transfer ship' : 'Set spawn proxy'
250 transfer ? 'Transfer ship' : 'Set spawn proxy'
251 } to Layer 2`}
251 } to Layer 2`}
252 {...bind}
252 {...bind}
253− onReturn={pop}
253+ onReturn={() => pop()}
254 />
254 />
255 </Box>
255 </Box>
256 );
256 );
src/views/Release/Transfer.js+1−1
@@ -159,7 +159,7 @@ export default function Transfer({ className, goActive }) {
159 as={InlineEthereumTransaction}
159 as={InlineEthereumTransaction}
160 {...bind}
160 {...bind}
161 label="Approve Transfer"
161 label="Approve Transfer"
162− onReturn={pop}
162+ onReturn={() => pop()}
163 />
163 />
164 </>
164 </>
165 )}
165 )}
src/views/UrbitID/Home.tsx+9−3
@@ -1,4 +1,5 @@
1import React, { useCallback, useState, useMemo } from 'react';
1import React, { useCallback, useState, useMemo } from 'react';
2+import * as need from 'lib/need';
2import { Just, Nothing } from 'folktale/maybe';
3import { Just, Nothing } from 'folktale/maybe';
3import { Box, Button, Icon, Row } from '@tlon/indigo-react';
4import { Box, Button, Icon, Row } from '@tlon/indigo-react';
4
5
@@ -30,9 +31,14 @@ export default function UrbitIDHome() {
30
31
31 const [keysDownloaded, setKeysDownloaded] = useState(false);
32 const [keysDownloaded, setKeysDownloaded] = useState(false);
32
33
33− const _urbitWallet = useMemo(() => urbitWallet.getOrElse(null), [
34+ const _urbitWallet = useMemo(() => {
35+ try {
36+ const wallet = need.wallet(urbitWallet);
37+ return wallet;
38+ } catch (err) {
39+ return null;
40+ }
34− urbitWallet,
41+ }, [urbitWallet]);
35− ]);
36 const { keyfile, filename } = useKeyfileGenerator();
42 const { keyfile, filename } = useKeyfileGenerator();
37 const [paper, setPaper] = useState(Nothing());
43 const [paper, setPaper] = useState(Nothing());
38
44
src/views/UrbitID/ResetKeys/ResetConfirm.js+1−1
@@ -79,7 +79,7 @@ export default function ResetConfirm({ newWallet, setNewWallet }) {
79 full
79 full
80 as={ForwardButton}
80 as={ForwardButton}
81 solid
81 solid
82− className="mt4"
82+ className="mt4 ph4"
83 accessory={blinkIf(Nothing.hasInstance(newWallet))}
83 accessory={blinkIf(Nothing.hasInstance(newWallet))}
84 disabled={Nothing.hasInstance(newWallet)}
84 disabled={Nothing.hasInstance(newWallet)}
85 onClick={goDownload}>
85 onClick={goDownload}>
src/views/UrbitID/ResetKeys/ResetDownload.js+2−2
@@ -20,14 +20,14 @@ export default function ReticketDownload({ newWallet }) {
20 const goVerify = useCallback(() => push(names.VERIFY), [push, names]);
20 const goVerify = useCallback(() => push(names.VERIFY), [push, names]);
21
21
22 return (
22 return (
23− <Grid className="mt4">
23+ <Grid className="mt4" style={{ width: '100%' }}>
24 <Grid.Item full as={Text}>
24 <Grid.Item full as={Text}>
25 Download the new passport, and keep it somewhere safe!
25 Download the new passport, and keep it somewhere safe!
26 </Grid.Item>
26 </Grid.Item>
27 <Grid.Item
27 <Grid.Item
28 full
28 full
29 as={!downloaded ? DownloadButton : ForwardButton}
29 as={!downloaded ? DownloadButton : ForwardButton}
30− className="mt4"
30+ className="mt4 ph4"
31 disabled={Nothing.hasInstance(newWallet)}
31 disabled={Nothing.hasInstance(newWallet)}
32 onClick={!downloaded ? download : goVerify}
32 onClick={!downloaded ? download : goVerify}
33 success={downloaded}
33 success={downloaded}
src/views/UrbitID/ResetKeys/ResetVerify.js+1−1
@@ -37,7 +37,7 @@ export default function ResetVerify({ newWallet }) {
37 const goExecute = useCallback(() => push(names.EXECUTE), [push, names]);
37 const goExecute = useCallback(() => push(names.EXECUTE), [push, names]);
38
38
39 return (
39 return (
40− <Grid className="mt4">
40+ <Grid className="mt4" style={{ width: '100%' }}>
41 <Grid.Item full as={Text}>
41 <Grid.Item full as={Text}>
42 Verify New Master Ticket
42 Verify New Master Ticket
43 </Grid.Item>
43 </Grid.Item>
src/views/UrbitID/SetProxy.js+1−1
@@ -306,7 +306,7 @@ export default function SetProxy() {
306 full
306 full
307 as={InlineEthereumTransaction}
307 as={InlineEthereumTransaction}
308 {...bind}
308 {...bind}
309− onReturn={pop}
309+ onReturn={() => pop()}
310 />
310 />
311 )}
311 )}
312 </>
312 </>
src/views/UrbitID/Transfer.js+1−1
@@ -175,7 +175,7 @@ export default function AdminTransfer() {
175 full
175 full
176 as={InlineEthereumTransaction}
176 as={InlineEthereumTransaction}
177 {...bind}
177 {...bind}
178− onReturn={pop}
178+ onReturn={() => pop()}
179 />
179 />
180 )}
180 )}
181 </>
181 </>
src/views/UrbitOS/NetworkingKeys.js+1−1
@@ -359,7 +359,7 @@ export default function UrbitOSNetworkingKeys({
359 as={InlineEthereumTransaction}
359 as={InlineEthereumTransaction}
360 {...bind}
360 {...bind}
361 label={`${hasKeys ? 'Reset' : 'Set'} Networking Keys`}
361 label={`${hasKeys ? 'Reset' : 'Set'} Networking Keys`}
362− onReturn={pop}
362+ onReturn={() => pop()}
363 />
363 />
364 )}
364 )}
365 </Box>
365 </Box>