on master help sign in
useRoller: get unspawned points from roller-api
c34d0bbyosoyubik
package-lock.json+3−3
@@ -7755,9 +7755,9 @@
7755 }
7755 }
7756 },
7756 },
7757 "@urbit/roller-api": {
7757 "@urbit/roller-api": {
7758− "version": "0.1.5",
7758+ "version": "0.1.6",
7759− "resolved": "https://registry.npmjs.org/@urbit/roller-api/-/roller-api-0.1.5.tgz",
7759+ "resolved": "https://registry.npmjs.org/@urbit/roller-api/-/roller-api-0.1.6.tgz",
7760− "integrity": "sha512-EVvBqINh9h1y+eHd320meqmlnOThq7OTRSV5pUNyjZrkdRgE7w6r+0txHuXVNusP+EFkniB/CP4h9CL3mbEpAw==",
7760+ "integrity": "sha512-JgZTugNzIPzL9wgvPSTaUu8ts1hi4Rgka4QwxBMGq6qeJo5S3q47cNg+dV+TVYcIYOyoNMAOq+1K9jEyui4ayQ==",
7761 "requires": {
7761 "requires": {
7762 "@open-rpc/client-js": "1.7.0",
7762 "@open-rpc/client-js": "1.7.0",
7763 "@open-rpc/meta-schema": "1.14.2",
7763 "@open-rpc/meta-schema": "1.14.2",
package.json+1−1
@@ -32,7 +32,7 @@
32 "@types/styled-components": "^5.1.10",
32 "@types/styled-components": "^5.1.10",
33 "@types/styled-system": "^5.1.11",
33 "@types/styled-system": "^5.1.11",
34 "@types/styled-system__css": "^5.0.15",
34 "@types/styled-system__css": "^5.0.15",
35− "@urbit/roller-api": "^0.1.5",
35+ "@urbit/roller-api": "^0.1.6",
36 "@walletconnect/client": "^1.6.2",
36 "@walletconnect/client": "^1.6.2",
37 "@walletconnect/qrcode-modal": "^1.6.2",
37 "@walletconnect/qrcode-modal": "^1.6.2",
38 "@welldone-software/why-did-you-render": "^3.2.3",
38 "@welldone-software/why-did-you-render": "^3.2.3",
src/lib/useRoller.ts+4−14
@@ -12,6 +12,7 @@ import {
12 RollerRPCAPI,
12 RollerRPCAPI,
13 Options,
13 Options,
14 EthAddress,
14 EthAddress,
15+ UnspawnedPoints,
15} from '@urbit/roller-api';
16} from '@urbit/roller-api';
16
17
17import { isDevelopment, isRopsten } from './flags';
18import { isDevelopment, isRopsten } from './flags';
@@ -102,18 +103,7 @@ export default function useRoller() {
102 throw new Error('Internal Error: Missing Contracts/Web3/Wallet');
103 throw new Error('Internal Error: Missing Contracts/Web3/Wallet');
103 }
104 }
104
105
105− // TODO: replace with api.getSpawned(point) from the Roller
106+ const planets: UnspawnedPoints = await api.getUnspawned(_point);
106− const planets: number[] = await azimuth.azimuth.getUnspawnedChildren(
107− _contracts,
108− _point
109− );
110−
111− // const planets: any = await azimuth.delegatedSending.getPlanetsToSend(
112− // _contracts,
113− // _point,
114− // numInvites,
115− // );
116−
117 const starInfo = await api.getPoint(_point);
107 const starInfo = await api.getPoint(_point);
118
108
119 const tickets: { ticket: string; planet: string }[] = [];
109 const tickets: { ticket: string; planet: string }[] = [];
@@ -164,8 +154,8 @@ export default function useRoller() {
164 contracts,
154 contracts,
165 pointCursor,
155 pointCursor,
166 wallet,
156 wallet,
167− walletHdPath,
157+ // walletHdPath,
168− walletType,
158+ // walletType,
169 web3,
159 web3,
170 ]
160 ]
171 );
161 );