Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: update naming #1032

Merged
merged 9 commits into from
Aug 17, 2023
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 prepareVotingPower;
Tuditi marked this conversation as resolved.
Show resolved Hide resolved
Tuditi marked this conversation as resolved.
Show resolved Hide resolved

## 1.0.4 - 2023-08-08

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

/** @deprecated use prepareIncreaseVotingPower() instead. */
async prepareVotingPower(amount: string): Promise<PreparedTransaction> {
Tuditi marked this conversation as resolved.
Show resolved Hide resolved
const response = await this.methodHandler.callAccountMethod(
this.meta.index,
{
name: 'prepareIncreaseVotingPower',
data: {
amount,
},
},
);
const parsed = JSON.parse(
response,
) as Response<PreparedTransactionData>;
return new PreparedTransaction(
plainToInstance(PreparedTransactionData, parsed.payload),
this,
);
}

/**
* 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
Loading