diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-08-03 07:02:58 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-08-03 07:03:19 +0800 |
commit | 82092ab50a73e15e167f387380cd75ac52581e88 (patch) | |
tree | bce674d1e668299c131f30f8c808a9167ac3167b /packages/contract-wrappers/test | |
parent | c3e6be7956adf4fabcc8dfffe081515562a1dde0 (diff) | |
download | dexon-sol-tools-82092ab50a73e15e167f387380cd75ac52581e88.tar.gz dexon-sol-tools-82092ab50a73e15e167f387380cd75ac52581e88.tar.zst dexon-sol-tools-82092ab50a73e15e167f387380cd75ac52581e88.zip |
Rename to calldata utils
Diffstat (limited to 'packages/contract-wrappers/test')
-rw-r--r-- | packages/contract-wrappers/test/calldata_optimization_utils_test.ts (renamed from packages/contract-wrappers/test/market_orders_optimization_utils_test.ts) | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts index 742294df2..107d913ba 100644 --- a/packages/contract-wrappers/test/market_orders_optimization_utils_test.ts +++ b/packages/contract-wrappers/test/calldata_optimization_utils_test.ts @@ -4,7 +4,7 @@ import * as _ from 'lodash'; import 'mocha'; import { constants } from '../src/utils/constants'; -import { marketOrdersOptimizationUtils } from '../src/utils/market_orders_optimization_utils'; +import { calldataOptimizationUtils } from '../src/utils/calldata_optimization_utils'; import { chaiSetup } from './utils/chai_setup'; import { assert } from '../src/utils/assert'; @@ -37,29 +37,29 @@ const generateFakeOrders = (makerAssetData: string, takerAssetData: string) => }; }); -describe('marketOrdersOptimizationUtils', () => { +describe('calldataOptimizationUtils', () => { const fakeMakerAssetData = 'fakeMakerAssetData'; const fakeTakerAssetData = 'fakeTakerAssetData'; const orders = generateFakeOrders(fakeMakerAssetData, fakeTakerAssetData); - describe('#optimizeMarketOrders', () => { + describe('#optimizeForwarderOrders', () => { it('should make makerAssetData `0x` unless first order', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); expect(optimizedOrders[0].makerAssetData).to.equal(fakeMakerAssetData); const ordersWithoutHead = _.slice(optimizedOrders, 1); _.forEach(ordersWithoutHead, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); }); it('should make all takerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeMarketOrders(orders); + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderOrders(orders); _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); }); }); - describe('#optimizeFeeOrders', () => { + describe('#optimizeForwarderFeeOrders', () => { it('should make all makerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); _.forEach(optimizedOrders, order => expect(order.makerAssetData).to.equal(constants.NULL_BYTES)); }); it('should make all takerAssetData `0x`', () => { - const optimizedOrders = marketOrdersOptimizationUtils.optimizeFeeOrders(orders); + const optimizedOrders = calldataOptimizationUtils.optimizeForwarderFeeOrders(orders); _.forEach(optimizedOrders, order => expect(order.takerAssetData).to.equal(constants.NULL_BYTES)); }); }); |