-
Notifications
You must be signed in to change notification settings - Fork 849
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Do not return errors when no account is present, return a zero balanc…
…e instead (#1951) Signed-off-by: Antoine Toulme <[email protected]>
- Loading branch information
Showing
5 changed files
with
29 additions
and
47 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
23 changes: 5 additions & 18 deletions
23
...s/org/hyperledger/besu/ethereum/api/graphql/eth_getBalance_invalidAccountBlockNumber.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,12 @@ | ||
{ | ||
"request": "{account(blockNumber:\"0x19\", address: \"0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef\") { balance } }", | ||
"response": { | ||
"errors": [ | ||
{ | ||
"message": "Exception while fetching data (/account) : Account with address 0xdeadbeefdeadbeefdeadbeefdeadbeefdeadbeef does not exist", | ||
"locations": [ | ||
{ | ||
"line": 1, | ||
"column": 2 | ||
} | ||
], | ||
"path": [ | ||
"account" | ||
], | ||
"extensions": { | ||
"classification": "DataFetchingException" | ||
} | ||
"data": { | ||
"account": { | ||
"balance": "0x" | ||
} | ||
], | ||
"data": null | ||
} | ||
}, | ||
"statusCode": 400 | ||
"statusCode": 200 | ||
} | ||
|
23 changes: 5 additions & 18 deletions
23
...ources/org/hyperledger/besu/ethereum/api/graphql/eth_getBalance_invalidAccountLatest.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,12 @@ | ||
{ | ||
"request": "{account(address: \"0xdeaff00ddeaff00ddeaff00ddeaff00ddeaff00d\") { balance } }", | ||
"response": { | ||
"errors": [ | ||
{ | ||
"message": "Exception while fetching data (/account) : Account with address 0xdeaff00ddeaff00ddeaff00ddeaff00ddeaff00d does not exist", | ||
"locations": [ | ||
{ | ||
"line": 1, | ||
"column": 2 | ||
} | ||
], | ||
"path": [ | ||
"account" | ||
], | ||
"extensions": { | ||
"classification": "DataFetchingException" | ||
} | ||
"data" : { | ||
"account" : { | ||
"balance" : "0x" | ||
} | ||
], | ||
"data": null | ||
} | ||
}, | ||
"statusCode": 400 | ||
"statusCode": 200 | ||
} | ||
|