Fix build and tests
This commit is contained in:
@@ -165,7 +165,7 @@ export class FinalizerActor extends BaseActor {
|
||||
const operatorShareByPoolId: OperatorShareByPoolId = {};
|
||||
for (const poolId of poolIds) {
|
||||
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
|
||||
const operatorShare = new BigNumber(pool[1]);
|
||||
const operatorShare = new BigNumber(pool[0]);
|
||||
operatorShareByPoolId[poolId] = operatorShare;
|
||||
}
|
||||
return operatorShareByPoolId;
|
||||
@@ -181,8 +181,8 @@ export class FinalizerActor extends BaseActor {
|
||||
|
||||
private async _getRewardVaultBalanceAsync(poolId: string): Promise<RewardVaultBalance> {
|
||||
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
|
||||
const operatorBalance = pool[2];
|
||||
const membersBalance = pool[3];
|
||||
const operatorBalance = pool[1];
|
||||
const membersBalance = pool[2];
|
||||
return {
|
||||
poolBalance: operatorBalance.plus(membersBalance),
|
||||
operatorBalance,
|
||||
|
@@ -104,7 +104,7 @@ export class PoolOperatorActor extends BaseActor {
|
||||
await txReceiptPromise;
|
||||
// Check operator share
|
||||
const pool = await this._stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
|
||||
const decreasedOperatorShare = new BigNumber(pool[1]);
|
||||
const decreasedOperatorShare = new BigNumber(pool[0]);
|
||||
expect(decreasedOperatorShare, 'updated operator share').to.be.bignumber.equal(newOperatorShare);
|
||||
}
|
||||
}
|
||||
|
@@ -123,8 +123,8 @@ blockchainTests.resets('Testing Rewards', env => {
|
||||
: ZERO,
|
||||
};
|
||||
const pool = await stakingApiWrapper.rewardVaultContract.poolById.callAsync(poolId);
|
||||
const operatorBalance = pool[2];
|
||||
const membersBalance = pool[3];
|
||||
const operatorBalance = pool[1];
|
||||
const membersBalance = pool[2];
|
||||
const poolBalances = { poolBalance: operatorBalance.plus(membersBalance), operatorBalance, membersBalance };
|
||||
const finalEndBalancesAsArray = await Promise.all([
|
||||
// staker 1
|
||||
|
@@ -46,7 +46,7 @@ blockchainTests.resets('Stake Statuses', env => {
|
||||
await stakingApiWrapper.utils.createStakingPoolAsync(poolOperator, 4, false),
|
||||
await stakingApiWrapper.utils.createStakingPoolAsync(poolOperator, 5, false),
|
||||
]);
|
||||
unusedPoolId = await stakingApiWrapper.stakingContract.getNextStakingPoolId.callAsync();
|
||||
unusedPoolId = await stakingApiWrapper.stakingContract.nextPoolId.callAsync();
|
||||
});
|
||||
describe('Stake', () => {
|
||||
it('should successfully stake zero ZRX', async () => {
|
||||
|
Reference in New Issue
Block a user