File tree Expand file tree Collapse file tree 3 files changed +43
-10
lines changed Expand file tree Collapse file tree 3 files changed +43
-10
lines changed Original file line number Diff line number Diff line change @@ -53,6 +53,6 @@ describe("Mina Devnet RPC", () => {
53
53
// biome-ignore lint/suspicious/noExplicitAny: TODO
54
54
const { result } = ( await response . json ( ) ) as any ;
55
55
expect ( BigInt ( result . nonce ) ) . toBeGreaterThanOrEqual ( 0 ) ;
56
- expect ( BigInt ( result . balance ) ) . toBeGreaterThanOrEqual ( 0 ) ;
56
+ expect ( BigInt ( result . balance . total ) ) . toBeGreaterThanOrEqual ( 0 ) ;
57
57
} ) ;
58
58
} ) ;
Original file line number Diff line number Diff line change @@ -26,5 +26,5 @@ it("should return network id", async () => {
26
26
it ( "should get account info" , async ( ) => {
27
27
const result = await mina . getAccount ( { publicKey : TEST_PKEY } ) ;
28
28
expect ( BigInt ( result . nonce ) ) . toBeGreaterThanOrEqual ( 0 ) ;
29
- expect ( BigInt ( result . balance ) ) . toBeGreaterThanOrEqual ( 0 ) ;
29
+ expect ( BigInt ( result . balance . total ) ) . toBeGreaterThanOrEqual ( 0 ) ;
30
30
} ) ;
Original file line number Diff line number Diff line change @@ -150,24 +150,57 @@ const getAccount = async ({ publicKey }: { publicKey: string }) => {
150
150
gql `
151
151
query {
152
152
account(publicKey: $publicKey) {
153
+ publicKey
154
+ token
153
155
nonce
154
156
balance {
155
157
total
156
158
}
159
+ tokenSymbol
160
+ receiptChainHash
161
+ timing {
162
+ initialMinimumBalance
163
+ cliffTime
164
+ cliffAmount
165
+ vestingPeriod
166
+ vestingIncrement
167
+ }
168
+ permissions {
169
+ editState
170
+ access
171
+ send
172
+ receive
173
+ setDelegate
174
+ setPermissions
175
+ setVerificationKey {
176
+ auth
177
+ txnVersion
178
+ }
179
+ setZkappUri
180
+ editActionState
181
+ setTokenSymbol
182
+ incrementNonce
183
+ setVotingFor
184
+ setTiming
185
+ }
186
+ delegateAccount { publicKey }
187
+ votingFor
188
+ zkappState
189
+ verificationKey {
190
+ verificationKey
191
+ hash
192
+ }
193
+ actionState
194
+ provedState
195
+ zkappUri
157
196
}
158
197
}
159
198
` ,
160
199
{ publicKey } ,
161
200
) ;
162
- return {
163
- nonce : data . account . nonce ,
164
- balance : data . account . balance . total ,
165
- } ;
201
+ return data . account ;
166
202
} catch {
167
- return {
168
- nonce : "0" ,
169
- balance : "0" ,
170
- } ;
203
+ return null ;
171
204
}
172
205
} ;
173
206
You can’t perform that action at this time.
0 commit comments