Skip to content

Commit 3c3d6fb

Browse files
authored
Get finalized token account balance by default (#55)
1 parent 0fb2aac commit 3c3d6fb

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/solana/client.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -698,7 +698,7 @@ func (c *client) GetTokenAccountBalance(account ed25519.PublicKey) (uint64, uint
698698
} `json:"context"`
699699
Value TokenAmount `json:"value"`
700700
}
701-
if err := c.call(&resp, "getTokenAccountBalance", base58.Encode(account[:]), CommitmentProcessed); err != nil {
701+
if err := c.call(&resp, "getTokenAccountBalance", base58.Encode(account[:]), CommitmentFinalized); err != nil {
702702
jsonRPCErr, ok := err.(*jsonrpc.RPCError)
703703
if !ok {
704704
return 0, 0, errors.Wrapf(err, "getTokenAccountBalance() failed to send request")

0 commit comments

Comments
 (0)