diff --git a/rpc/client.go b/rpc/client.go index f371ff7..2cf8656 100644 --- a/rpc/client.go +++ b/rpc/client.go @@ -86,13 +86,13 @@ func (c *Client) GetRecentBlockhash(ctx context.Context, commitment CommitmentTy } // GetSlot returns the current slot the node is processing. -func (c *Client) GetSlot(ctx context.Context, commitment CommitmentType) (out GetSlotResult, err error) { +func (c *Client) GetSlot(ctx context.Context, commitment CommitmentType) (out bin.Uint64, err error) { var params []interface{} if commitment != "" { - params = append(params, string(commitment)) + params = append(params, M{"commitment": commitment}) } - err = c.rpcClient.CallFor(&out, "getSlot", params...) + err = c.rpcClient.CallFor(&out, "getSlot", params) return } diff --git a/rpc/types.go b/rpc/types.go index 28bddf0..2e2b6a6 100644 --- a/rpc/types.go +++ b/rpc/types.go @@ -32,8 +32,6 @@ type GetBalanceResult struct { Value bin.Uint64 `json:"value"` } -type GetSlotResult bin.Uint64 - type GetRecentBlockhashResult struct { RPCContext Value BlockhashResult `json:"value"`