aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/protocol
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-12-11 08:10:49 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-12-11 08:10:49 +0800
commite72742f1f76dd3b46976ed3d0f272b539bdfb229 (patch)
tree968debeda7e6efcabd58c7218d5dff05dc24f357 /contracts/protocol
parent928b253c81971eb6f59efd09ab6a9063d4e6e4ca (diff)
parent253bf4df6a6909d8bd65361c0d115e9d1a8e489e (diff)
downloaddexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.gz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.bz2
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.lz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.xz
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.tar.zst
dexon-sol-tools-e72742f1f76dd3b46976ed3d0f272b539bdfb229.zip
Merge branch 'development' into feature/contracts-monorepo-7
Diffstat (limited to 'contracts/protocol')
-rw-r--r--contracts/protocol/test/exchange/signature_validator.ts6
-rw-r--r--contracts/protocol/test/utils/exchange_wrapper.ts2
2 files changed, 4 insertions, 4 deletions
diff --git a/contracts/protocol/test/exchange/signature_validator.ts b/contracts/protocol/test/exchange/signature_validator.ts
index 62579cdc7..3f1786b5b 100644
--- a/contracts/protocol/test/exchange/signature_validator.ts
+++ b/contracts/protocol/test/exchange/signature_validator.ts
@@ -135,7 +135,7 @@ describe('MixinSignatureValidator', () => {
it('should revert when signature type is unsupported', async () => {
const unsupportedSignatureType = SignatureType.NSignatureTypes;
- const unsupportedSignatureHex = '0x' + Buffer.from([unsupportedSignatureType]).toString('hex');
+ const unsupportedSignatureHex = `0x${Buffer.from([unsupportedSignatureType]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailedAsync(
signatureValidator.publicIsValidSignature.callAsync(
@@ -148,7 +148,7 @@ describe('MixinSignatureValidator', () => {
});
it('should revert when SignatureType=Illegal', async () => {
- const unsupportedSignatureHex = '0x' + Buffer.from([SignatureType.Illegal]).toString('hex');
+ const unsupportedSignatureHex = `0x${Buffer.from([SignatureType.Illegal]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
return expectContractCallFailedAsync(
signatureValidator.publicIsValidSignature.callAsync(
@@ -161,7 +161,7 @@ describe('MixinSignatureValidator', () => {
});
it('should return false when SignatureType=Invalid and signature has a length of zero', async () => {
- const signatureHex = '0x' + Buffer.from([SignatureType.Invalid]).toString('hex');
+ const signatureHex = `0x${Buffer.from([SignatureType.Invalid]).toString('hex')}`;
const orderHashHex = orderHashUtils.getOrderHashHex(signedOrder);
const isValidSignature = await signatureValidator.publicIsValidSignature.callAsync(
orderHashHex,
diff --git a/contracts/protocol/test/utils/exchange_wrapper.ts b/contracts/protocol/test/utils/exchange_wrapper.ts
index 075d2cb96..cb6dce901 100644
--- a/contracts/protocol/test/utils/exchange_wrapper.ts
+++ b/contracts/protocol/test/utils/exchange_wrapper.ts
@@ -229,7 +229,7 @@ export class ExchangeWrapper {
return orderEpoch;
}
public async getOrderInfoAsync(signedOrder: SignedOrder): Promise<OrderInfo> {
- const orderInfo = (await this._exchange.getOrderInfo.callAsync(signedOrder)) as OrderInfo;
+ const orderInfo = await this._exchange.getOrderInfo.callAsync(signedOrder);
return orderInfo;
}
public async getOrdersInfoAsync(signedOrders: SignedOrder[]): Promise<OrderInfo[]> {