Readability Improvements
This commit is contained in:
@@ -64,7 +64,7 @@ export class Simulation {
|
||||
await this._withdrawRewardForStakingPoolMemberForDelegatorsByUndelegatingAsync(this._p);
|
||||
}
|
||||
|
||||
// @TODO cleanup state and verify the staking contract is empty
|
||||
// @TODO cleanup status and verify the staking contract is empty
|
||||
}
|
||||
|
||||
private async _withdrawRewardForStakingPoolMemberForDelegatorsByUndelegatingAsync(
|
||||
|
@@ -203,27 +203,27 @@ export class StakingWrapper {
|
||||
}
|
||||
public async moveStakeAsync(
|
||||
owner: string,
|
||||
_fromState: {
|
||||
state: number,
|
||||
_fromStatus: {
|
||||
status: number,
|
||||
poolId?: string
|
||||
},
|
||||
_toState: {
|
||||
state: number,
|
||||
_toStatus: {
|
||||
status: number,
|
||||
poolId?: string
|
||||
},
|
||||
amount: BigNumber,
|
||||
): Promise<TransactionReceiptWithDecodedLogs> {
|
||||
const fromState = {
|
||||
state: _fromState.state,
|
||||
poolId: _fromState.poolId !== undefined ? _fromState.poolId : constants.NIL_POOL_ID
|
||||
const fromStatus = {
|
||||
status: _fromStatus.status,
|
||||
poolId: _fromStatus.poolId !== undefined ? _fromStatus.poolId : constants.NIL_POOL_ID
|
||||
};
|
||||
const toState = {
|
||||
state: _toState.state,
|
||||
poolId: _toState.poolId !== undefined ? _toState.poolId : constants.NIL_POOL_ID
|
||||
const toStatus = {
|
||||
status: _toStatus.status,
|
||||
poolId: _toStatus.poolId !== undefined ? _toStatus.poolId : constants.NIL_POOL_ID
|
||||
};
|
||||
const calldata = this.getStakingContract().moveStake.getABIEncodedTransactionData(
|
||||
fromState,
|
||||
toState,
|
||||
fromStatus,
|
||||
toStatus,
|
||||
amount,
|
||||
);
|
||||
const txReceipt = await this._executeTransactionAsync(calldata, owner);
|
||||
|
@@ -50,11 +50,11 @@ export interface SimulationParams {
|
||||
}
|
||||
|
||||
export interface StakeBalance {
|
||||
current: BigNumber,
|
||||
next: BigNumber,
|
||||
currentEpochBalance: BigNumber,
|
||||
nextEpochBalance: BigNumber,
|
||||
}
|
||||
|
||||
export enum StakeStateId {
|
||||
export enum StakeStatus {
|
||||
ACTIVE,
|
||||
INACTIVE,
|
||||
DELEGATED
|
||||
|
Reference in New Issue
Block a user