aboutsummaryrefslogtreecommitdiffstats
path: root/contracts/core
diff options
context:
space:
mode:
authorFabio B <kandinsky454@protonmail.ch>2018-12-11 02:29:17 +0800
committerGitHub <noreply@github.com>2018-12-11 02:29:17 +0800
commit6c86cc8ab87ae6f8d435546ec80161faee7bce74 (patch)
treedcdf1233e5f86070b24b751c1b7792072360371d /contracts/core
parent8d93413a5d49bcafe4b5d0dee359cc09afce7222 (diff)
parentf14603ca4d91ca72d9e81de53168230d85bc50aa (diff)
downloaddexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.gz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.bz2
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.lz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.xz
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.tar.zst
dexon-sol-tools-6c86cc8ab87ae6f8d435546ec80161faee7bce74.zip
Merge pull request #1405 from 0xProject/tslint-changes
Implement prefer-template tslint rule
Diffstat (limited to 'contracts/core')
-rw-r--r--contracts/core/test/exchange/signature_validator.ts6
-rw-r--r--contracts/core/test/utils/exchange_wrapper.ts2
2 files changed, 4 insertions, 4 deletions
diff --git a/contracts/core/test/exchange/signature_validator.ts b/contracts/core/test/exchange/signature_validator.ts
index ae372d677..a968570b6 100644
--- a/contracts/core/test/exchange/signature_validator.ts
+++ b/contracts/core/test/exchange/signature_validator.ts
@@ -136,7 +136,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(
@@ -149,7 +149,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(
@@ -162,7 +162,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/core/test/utils/exchange_wrapper.ts b/contracts/core/test/utils/exchange_wrapper.ts
index 075d2cb96..cb6dce901 100644
--- a/contracts/core/test/utils/exchange_wrapper.ts
+++ b/contracts/core/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[]> {