Skip to content

Commit

Permalink
add check for nil error
Browse files Browse the repository at this point in the history
  • Loading branch information
AryanGodara committed Apr 1, 2024
1 parent 0bdaab7 commit 637522e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion rpc/version.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,8 @@ import "context"
func (provider *Provider) SpecVersion(ctx context.Context) (string, *RPCError) {
var result string
err := do(ctx, provider.c, "starknet_specVersion", &result)
return result, Err(InternalError, err)
if err != nil {
return "", Err(InternalError, err)
}
return result, nil
}

0 comments on commit 637522e

Please sign in to comment.