Skip to content

Commit

Permalink
feat: include all account object properties in GraphQL response for g…
Browse files Browse the repository at this point in the history
…etAccount API query
  • Loading branch information
DeMonkeyCoder authored Dec 18, 2024
1 parent 05cdbc4 commit 24e2c0e
Showing 1 changed file with 41 additions and 8 deletions.
49 changes: 41 additions & 8 deletions apps/klesia/src/methods/mina.ts
Original file line number Diff line number Diff line change
Expand Up @@ -150,24 +150,57 @@ const getAccount = async ({ publicKey }: { publicKey: string }) => {
gql`
query {
account(publicKey: $publicKey) {
publicKey
token
nonce
balance {
total
}
tokenSymbol
receiptChainHash
timing {
initialMinimumBalance
cliffTime
cliffAmount
vestingPeriod
vestingIncrement
}
permissions {
editState
access
send
receive
setDelegate
setPermissions
setVerificationKey {
auth
txnVersion
}
setZkappUri
editActionState
setTokenSymbol
incrementNonce
setVotingFor
setTiming
}
delegateAccount { publicKey }
votingFor
zkappState
verificationKey {
verificationKey
hash
}
actionState
provedState
zkappUri
}
}
`,
{ publicKey },
);
return {
nonce: data.account.nonce,
balance: data.account.balance.total,
};
return data.account;
} catch {
return {
nonce: "0",
balance: "0",
};
return null;
}
};

Expand Down

0 comments on commit 24e2c0e

Please sign in to comment.