Skip to content

Commit ac4b5d9

Browse files
handle 0 results from getHistory without error-ing
Similar to getLogs, getHistory seems to return `result.status == 0` when there are no results found.
1 parent fdb7114 commit ac4b5d9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

providers/etherscan-provider.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,8 +59,8 @@ utils.defineProperty(EtherscanProvider.prototype, '_callProxy', function() {
5959
});
6060

6161
function getResult(result) {
62-
// getLogs has weird success responses
63-
if (result.status == 0 && result.message === 'No records found') {
62+
// getLogs, getHistory have weird success responses
63+
if (result.status == 0 && (result.message === 'No records found' || result.message === 'No transactions found')) {
6464
return result.result;
6565
}
6666

0 commit comments

Comments
 (0)