address comments
This commit is contained in:
@@ -198,7 +198,7 @@ blockchainTests('erc20-bridge-sampler', env => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getDeterministicOrderInfo(order: Order): OrderInfo {
|
function getDeterministicOrderInfo(order: Order): OrderInfo {
|
||||||
const hash = getPackedHash(toHex(order.salt, 32));
|
const hash = getPackedHash(hexLeftPad(order.salt, 32));
|
||||||
return {
|
return {
|
||||||
orderHash: hash,
|
orderHash: hash,
|
||||||
orderStatus: new BigNumber(hash).mod(255).toNumber(),
|
orderStatus: new BigNumber(hash).mod(255).toNumber(),
|
||||||
|
|||||||
@@ -410,7 +410,7 @@ blockchainTests.resets('Transaction <> protocol fee integration tests', env => {
|
|||||||
const tx = deployment.exchange
|
const tx = deployment.exchange
|
||||||
.batchExecuteTransactions(transactions, signatures)
|
.batchExecuteTransactions(transactions, signatures)
|
||||||
.awaitTransactionSuccessAsync({ from: alice.address, value: MIXED_FEES_WITH_REFUND });
|
.awaitTransactionSuccessAsync({ from: alice.address, value: MIXED_FEES_WITH_REFUND });
|
||||||
expect(tx).to.revertWith(protocolFeeError(order, failTransaction));
|
return expect(tx).to.revertWith(protocolFeeError(order, failTransaction));
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
describe('Nested', () => {
|
describe('Nested', () => {
|
||||||
|
|||||||
@@ -272,14 +272,14 @@ export class ForwarderTestFactory {
|
|||||||
balances.wrapEth(this._forwarder.address, this._deployment.tokens.weth.address, wethSpentAmount);
|
balances.wrapEth(this._forwarder.address, this._deployment.tokens.weth.address, wethSpentAmount);
|
||||||
// (In reality this is done all at once, but we simulate it order by order)
|
// (In reality this is done all at once, but we simulate it order by order)
|
||||||
|
|
||||||
// Maker -> Forwarder
|
|
||||||
balances.transferAsset(order.makerAddress, this._forwarder.address, makerAssetAmount, order.makerAssetData);
|
|
||||||
// Maker -> Order fee recipient
|
|
||||||
balances.transferAsset(order.makerAddress, order.feeRecipientAddress, makerFee, order.makerFeeAssetData);
|
|
||||||
// Forwarder -> Maker
|
// Forwarder -> Maker
|
||||||
balances.transferAsset(this._forwarder.address, order.makerAddress, takerAssetAmount, order.takerAssetData);
|
balances.transferAsset(this._forwarder.address, order.makerAddress, takerAssetAmount, order.takerAssetData);
|
||||||
|
// Maker -> Forwarder
|
||||||
|
balances.transferAsset(order.makerAddress, this._forwarder.address, makerAssetAmount, order.makerAssetData);
|
||||||
// Forwarder -> Order fee recipient
|
// Forwarder -> Order fee recipient
|
||||||
balances.transferAsset(this._forwarder.address, order.feeRecipientAddress, takerFee, order.takerFeeAssetData);
|
balances.transferAsset(this._forwarder.address, order.feeRecipientAddress, takerFee, order.takerFeeAssetData);
|
||||||
|
// Maker -> Order fee recipient
|
||||||
|
balances.transferAsset(order.makerAddress, order.feeRecipientAddress, makerFee, order.makerFeeAssetData);
|
||||||
// Forwarder pays the protocol fee in WETH
|
// Forwarder pays the protocol fee in WETH
|
||||||
balances.transferAsset(
|
balances.transferAsset(
|
||||||
this._forwarder.address,
|
this._forwarder.address,
|
||||||
|
|||||||
Reference in New Issue
Block a user