refactor transaction integration tests to use new framework
This commit is contained in:
@@ -142,6 +142,12 @@ export class Actor {
|
||||
customTransactionParams: Partial<ZeroExTransaction>,
|
||||
signatureType: SignatureType = SignatureType.EthSign,
|
||||
): Promise<SignedZeroExTransaction> {
|
||||
return this._transactionFactory.newSignedTransactionAsync(customTransactionParams, signatureType);
|
||||
return this._transactionFactory.newSignedTransactionAsync(
|
||||
{
|
||||
gasPrice: DeploymentManager.gasPrice,
|
||||
...customTransactionParams,
|
||||
},
|
||||
signatureType,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
@@ -1,4 +1,4 @@
|
||||
import { constants, OrderFactory, orderUtils } from '@0x/contracts-test-utils';
|
||||
import { constants, OrderFactory } from '@0x/contracts-test-utils';
|
||||
import { Order, SignedOrder } from '@0x/types';
|
||||
import { TransactionReceiptWithDecodedLogs } from 'ethereum-types';
|
||||
|
||||
@@ -58,8 +58,7 @@ export function MakerMixin<TBase extends Constructor>(Base: TBase): TBase & Cons
|
||||
* Cancels one of the maker's orders.
|
||||
*/
|
||||
public async cancelOrderAsync(order: SignedOrder): Promise<TransactionReceiptWithDecodedLogs> {
|
||||
const params = orderUtils.createCancel(order);
|
||||
return this.actor.deployment.exchange.cancelOrder(params.order).awaitTransactionSuccessAsync({
|
||||
return this.actor.deployment.exchange.cancelOrder(order).awaitTransactionSuccessAsync({
|
||||
from: this.actor.address,
|
||||
});
|
||||
}
|
||||
|
Reference in New Issue
Block a user