on master help sign in
Merge pull request #1072 from urbit/pkova/actually-fix
398a47dtomholford
src/lib/useRoller.ts+2−1
@@ -213,7 +213,8 @@ export default function useRoller() {
213 }: UpdateParams) => {
213 }: UpdateParams) => {
214
214
215
215
216− const p = (typeof point === 'number' ? await initPoint(point) : point) as Point
216+ const pVal = (typeof point === 'number' ? point : point.value);
217+ const p = await initPoint(pVal);
217
218
218 if (l1Txn) storePendingL1Txn(l1Txn);
219 if (l1Txn) storePendingL1Txn(l1Txn);
219
220
src/views/UrbitOS/NetworkKeys.tsx+3−4
@@ -47,13 +47,13 @@ import BodyPane from 'components/L2/Window/BodyPane';
47
47
48import './NetworkKeys.scss';
48import './NetworkKeys.scss';
49import { L1TxnType } from 'lib/types/PendingL1Transaction';
49import { L1TxnType } from 'lib/types/PendingL1Transaction';
50+import { PointField } from 'lib/types/Point';
50
51
51function useSetKeys(
52function useSetKeys(
52 manualNetworkSeed: string,
53 manualNetworkSeed: string,
53 setManualNetworkSeed: (seed: string) => void
54 setManualNetworkSeed: (seed: string) => void
54) {
55) {
55 const { urbitWallet, wallet, authMnemonic, authToken }: any = useWallet();
56 const { urbitWallet, wallet, authMnemonic, authToken }: any = useWallet();
56− const { getAndUpdatePoint } = useRoller();
57 const { point } = useRollerStore();
57 const { point } = useRollerStore();
58 const { syncDetails, syncRekeyDate }: any = usePointCache();
58 const { syncDetails, syncRekeyDate }: any = usePointCache();
59 const { contracts }: any = useNetwork();
59 const { contracts }: any = useNetwork();
@@ -127,9 +127,7 @@ function useSetKeys(
127 [_contracts, point, buildNetworkSeed]
127 [_contracts, point, buildNetworkSeed]
128 ),
128 ),
129 useCallback(
129 useCallback(
130− () => Promise.all([getAndUpdatePoint(point.value),
131− syncDetails(point.value),
132− syncRekeyDate(point.value)]),
130+ () => Promise.all([syncDetails(point.value), syncRekeyDate(point.value)]),
133 [point, syncDetails, syncRekeyDate]
131 [point, syncDetails, syncRekeyDate]
134 ),
132 ),
135 GAS_LIMITS.CONFIGURE_KEYS
133 GAS_LIMITS.CONFIGURE_KEYS
@@ -180,6 +178,7 @@ export default function UrbitOSNetworkKeys({
180 if (completed) {
178 if (completed) {
181 checkForUpdates({
179 checkForUpdates({
182 point: point,
180 point: point,
181+ field: PointField.keyRevisionNumber,
183 message: `${point.patp}'s Network Keys have been set!`,
182 message: `${point.patp}'s Network Keys have been set!`,
184 l1Txn: {
183 l1Txn: {
185 id: `${point.keyRevisionNumber}-network-keys-${point.value}`,
184 id: `${point.keyRevisionNumber}-network-keys-${point.value}`,