Skip to content

Commit

Permalink
fix: return promise on getNewAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
gridcat committed Jun 23, 2021
1 parent e7978cf commit 01460a5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
"test:unit": "jest test/unit/*",
"test:regression": "jest ./test/regression",
"test:watch": "jest --watch",
"test:prod": "npm run lint && npm run test -- --coverage --no-cache",
"test:prod": "npm run lint && npm run test:unit -- --coverage --no-cache",
"build:docs": "ts-node --project tools/tsconfig.json tools/generate-doc.ts",
"deploy:docs": "ts-node --project tools/tsconfig.json tools/gh-pages-publish",
"report-coverage": "cat ./coverage/lcov.info | coveralls",
Expand Down
4 changes: 2 additions & 2 deletions src/GridcoinRPC.ts
Original file line number Diff line number Diff line change
Expand Up @@ -283,8 +283,8 @@ export class GridcoinRPC extends RPCBase {
* @returns {Promise<string>}
* @memberof GridcoinRPC
*/
public getNewAddress(account?: string): Promise<Address> {
const address = this.call<string>('getnewaddress', account);
public async getNewAddress(account?: string): Promise<Address> {
const address = await this.call<string>('getnewaddress', account);
return new Address(address);
}

Expand Down

0 comments on commit 01460a5

Please sign in to comment.