Skip to content

Commit

Permalink
Fix: update naming (#1032)
Browse files Browse the repository at this point in the history
* chore: fix typo & deprecate previous function

* chore: changelog

* chore: format

* Update bindings/nodejs/CHANGELOG.md

Co-authored-by: Thibault Martinez <[email protected]>

* Update bindings/nodejs/CHANGELOG.md

Co-authored-by: Thibault Martinez <[email protected]>

* Update bindings/nodejs/CHANGELOG.md

Co-authored-by: Thibault Martinez <[email protected]>

* Update bindings/nodejs/CHANGELOG.md

Co-authored-by: Thibault Martinez <[email protected]>

* chore: remove code duplication

* chore: format

---------

Co-authored-by: Thibault Martinez <[email protected]>
  • Loading branch information
Tuditi and thibault-martinez authored Aug 17, 2023
1 parent 17a267b commit aa97248
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 2 deletions.
7 changes: 6 additions & 1 deletion bindings/nodejs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

### Added

- Export ILoggerConfig from types;
- Export `ILoggerConfig` from types;
- Added `Account::prepareIncreaseVotingPower`;

## Changed

- Deprecate `Account::prepareVotingPower`;

## 1.0.4 - 2023-08-08

Expand Down
9 changes: 8 additions & 1 deletion bindings/nodejs/lib/wallet/account.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1389,13 +1389,20 @@ export class Account {
return JSON.parse(response).payload;
}

/** @deprecated use prepareIncreaseVotingPower() instead. */
async prepareVotingPower(amount: string): Promise<PreparedTransaction> {
return this.prepareIncreaseVotingPower(amount);
}

/**
* Prepare to increase the voting power.
*
* @param amount The amount to increase the voting power by.
* @returns An instance of `PreparedTransaction`.
*/
async prepareVotingPower(amount: string): Promise<PreparedTransaction> {
async prepareIncreaseVotingPower(
amount: string,
): Promise<PreparedTransaction> {
const response = await this.methodHandler.callAccountMethod(
this.meta.index,
{
Expand Down

0 comments on commit aa97248

Please sign in to comment.