* update abi-gen with new method interfaces * wip: get all packages to build * wip: get all packages to build * Fix two contract wrapper calls * Export necessary types part of the contract wrapper public interfaces * Revive and fix wrapper_unit_tests * Remove duplicate type * Fix lib_exchange_rich_error_decoder tests * Fix remaining test failures in contracts-* packages * Prettier fixes * remove transactionHelper * lint and update changelogs * Fix prettier * Revert changes to reference docs * Add back changelog already published and add revert changelog entry * Add missing CHANGELOG entries * Add missing comma * Update mesh-rpc-client dep * Update Mesh RPC logic in @0x/orderbook to v6.0.1-beta * Align package versions
23 lines
962 B
TypeScript
23 lines
962 B
TypeScript
import { expect } from '@0x/contracts-test-utils';
|
|
import { RevertError } from '@0x/utils';
|
|
import * as _ from 'lodash';
|
|
|
|
import { PoolOperatorActor } from './pool_operator_actor';
|
|
|
|
export class MakerActor extends PoolOperatorActor {
|
|
public async joinStakingPoolAsMakerAsync(poolId: string, revertError?: RevertError): Promise<void> {
|
|
// add maker
|
|
const txReceiptPromise = this._stakingApiWrapper.stakingContract
|
|
.joinStakingPoolAsMaker(poolId)
|
|
.awaitTransactionSuccessAsync({ from: this.getOwner() });
|
|
if (revertError !== undefined) {
|
|
await expect(txReceiptPromise).to.revertWith(revertError);
|
|
return;
|
|
}
|
|
await txReceiptPromise;
|
|
// check the pool id of the maker
|
|
const poolIdOfMaker = await this._stakingApiWrapper.stakingContract.poolIdByMaker(this.getOwner()).callAsync();
|
|
expect(poolIdOfMaker, 'pool id of maker').to.be.equal(poolId);
|
|
}
|
|
}
|