Clean up RPC/GetRecentBlockhash

This commit is contained in:
Slavomir 2021-07-01 18:30:39 +02:00
parent 6172f0e834
commit 76750a9d90
1 changed files with 3 additions and 3 deletions

View File

@ -73,11 +73,11 @@ func (cl *Client) GetBalance(
// GetRecentBlockhash returns a recent block hash from the ledger,
// and a fee schedule that can be used to compute the cost of submitting a transaction using it.
func (c *Client) GetRecentBlockhash(ctx context.Context, commitment CommitmentType) (out *GetRecentBlockhashResult, err error) {
commit := map[string]string{
"commitment": string(commitment),
}
var params []interface{}
if commitment != "" {
commit := map[string]string{
"commitment": string(commitment),
}
params = append(params, commit)
}