Skip to content

Commit

Permalink
feat(core-api): return wallet vote on v2 endpoints (#2009)
Browse files Browse the repository at this point in the history
* feat: return wallet vote on v2 endpoints

* test: expect vote with wallet responses
  • Loading branch information
alexbarnsley authored and faustbrian committed Jan 22, 2019
1 parent 00a9f86 commit 7d6125c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/core-api/__tests__/v2/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,7 @@ class Helpers {
expect(wallet).toHaveProperty("publicKey");
expect(wallet).toHaveProperty("balance");
expect(wallet).toHaveProperty("isDelegate");
expect(wallet).toHaveProperty("vote");
}

public async createTransaction() {
Expand Down
1 change: 1 addition & 0 deletions packages/core-api/src/versions/2/wallets/transformer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,6 @@ export function transformWallet(model) {
secondPublicKey: model.secondPublicKey,
balance: +bignumify(model.balance).toFixed(),
isDelegate: !!model.username,
vote: model.vote,
};
}

0 comments on commit 7d6125c

Please sign in to comment.