Skip to content

Commit

Permalink
Update SpecVersion to stop returning InternalError for nil errors (Ne…
Browse files Browse the repository at this point in the history
…thermindEth#549)

* fix starknet_specVersion handler
  • Loading branch information
AryanGodara authored Apr 2, 2024
1 parent 34a506f commit 02a8f45
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
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, error) {
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
}
2 changes: 1 addition & 1 deletion rpc/version_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func TestSpecVersion(t *testing.T) {
"mainnet": {},
"mock": {},
"testnet": {{
ExpectedResp: "0.6.0",
ExpectedResp: "0.7.0",
}},
}[testEnv]

Expand Down

0 comments on commit 02a8f45

Please sign in to comment.