Skip to content

Commit

Permalink
Add ErrorResponse type and run prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-ptera committed May 11, 2021
1 parent 3da77ba commit b8f3a59
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## v1.0.2

### Added

- Added type `ErrorResponse` for RPC errors.

### Changed

- Changed `account_info` `params` to be optional.
Expand Down
2 changes: 1 addition & 1 deletion src/client/nano-client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ export class NanoClient {
blocks(hashes: string[], json_block = true): Promise<RPC.BlocksResponse> {
return this._send('blocks', {
hashes,
json_block
json_block,
});
}

Expand Down
3 changes: 3 additions & 0 deletions src/types/rpc-response.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
export type ErrorResponse = {
error: string;
};
export type AccountBalanceResponse = {
balance: string;
pending: string;
Expand Down

0 comments on commit b8f3a59

Please sign in to comment.