aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-17 18:59:02 +0800
commitbf8ac3b9e6ee59f267f7850418febfe84dedceb8 (patch)
tree0617e583892f9a8fe96a55dcac3a7f9af1ddae10 /packages/subproviders/test
parentedcdc9b1b903158cc61529853d7e9028ecbc266a (diff)
downloaddexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.gz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.bz2
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.lz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.xz
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.tar.zst
dexon-sol-tools-bf8ac3b9e6ee59f267f7850418febfe84dedceb8.zip
Fix tslint issues
Diffstat (limited to 'packages/subproviders/test')
-rw-r--r--packages/subproviders/test/integration/ledger_subprovider_test.ts2
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts2
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts24
3 files changed, 14 insertions, 14 deletions
diff --git a/packages/subproviders/test/integration/ledger_subprovider_test.ts b/packages/subproviders/test/integration/ledger_subprovider_test.ts
index 103e8f952..527ee5b22 100644
--- a/packages/subproviders/test/integration/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/integration/ledger_subprovider_test.ts
@@ -176,7 +176,7 @@ describe('LedgerSubprovider', () => {
params: [tx],
id: 1,
};
- await promisify(defaultProvider.sendAsync, defaultProvider)(payload);
+ await promisify(defaultProvider.sendAsync.bind(defaultProvider))(payload);
// Send transaction from Ledger
tx = {
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts
index edff5144e..a1d146dbc 100644
--- a/packages/subproviders/test/unit/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts
@@ -55,7 +55,7 @@ describe('LedgerSubprovider', () => {
return ecSignature;
},
transport: {
- close: _.noop,
+ close: _.noop.bind(_),
} as LedgerCommunicationClient,
};
// tslint:enable:no-object-literal-type-assertion
diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
index c437d0815..05f213cf5 100644
--- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
+++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
@@ -60,9 +60,9 @@ describe('NonceTrackerSubprovider', () => {
const payload = { ...getTransactionCountPayload, params: ['0x0', 'pending'] };
- const response = await promisify<any>(provider.sendAsync, provider)(payload);
+ const response = await promisify<any>(provider.sendAsync.bind(provider))(payload);
expect(response.result).to.be.eq('0x00');
- const secondResponse = await promisify<any>(provider.sendAsync, provider)(payload);
+ const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(payload);
expect(secondResponse.result).to.be.eq('0x00');
});
it('does not cache the result for latest transaction count', async () => {
@@ -74,9 +74,9 @@ describe('NonceTrackerSubprovider', () => {
const payload = { ...getTransactionCountPayload, params: ['0x0', 'latest'] };
- const response = await promisify<any>(provider.sendAsync, provider)(payload);
+ const response = await promisify<any>(provider.sendAsync.bind(provider))(payload);
expect(response.result).to.be.eq('0x00');
- const secondResponse = await promisify<any>(provider.sendAsync, provider)(payload);
+ const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(payload);
expect(secondResponse.result).to.be.eq('0x99');
});
it('clears the cache on a Nonce Too Low Error', async () => {
@@ -103,14 +103,14 @@ describe('NonceTrackerSubprovider', () => {
params: [transaction.serialize()],
};
- const response = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ const response = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(response.result).to.be.eq('0x00');
- const secondResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(secondResponse.result).to.be.eq('0x00');
try {
- await promisify(provider.sendAsync, provider)(txPayload);
+ await promisify(provider.sendAsync.bind(provider))(txPayload);
} catch (err) {
- const thirdResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ const thirdResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(thirdResponse.result).to.be.eq('0x99');
}
});
@@ -138,12 +138,12 @@ describe('NonceTrackerSubprovider', () => {
params: [transaction.serialize()],
};
- const response = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ const response = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(response.result).to.be.eq('0x00');
- const secondResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ const secondResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(secondResponse.result).to.be.eq('0x00');
- await promisify(provider.sendAsync, provider)(txPayload);
- const thirdResponse = await promisify<any>(provider.sendAsync, provider)(noncePayload);
+ await promisify(provider.sendAsync.bind(provider))(txPayload);
+ const thirdResponse = await promisify<any>(provider.sendAsync.bind(provider))(noncePayload);
expect(thirdResponse.result).to.be.eq('0x01');
});
});