aboutsummaryrefslogtreecommitdiffstats
path: root/packages/subproviders/test
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-06-12 05:42:30 +0800
committerFabio Berger <me@fabioberger.com>2018-06-12 05:42:30 +0800
commite1879ef4d91fc58203d9748eca38695b79c43674 (patch)
tree0a9a68927d5dc769b0c5cb2c5d9445849fb56e7c /packages/subproviders/test
parentb6df727efb74084a849330273a44cfc5ae3a85af (diff)
downloaddexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar.gz
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar.bz2
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar.lz
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar.xz
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.tar.zst
dexon-sol-tools-e1879ef4d91fc58203d9748eca38695b79c43674.zip
Fix no-unused-variable tslint rule to include parameters and fix issues
Diffstat (limited to 'packages/subproviders/test')
-rw-r--r--packages/subproviders/test/unit/ledger_subprovider_test.ts10
-rw-r--r--packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts10
-rw-r--r--packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts6
-rw-r--r--packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts12
4 files changed, 19 insertions, 19 deletions
diff --git a/packages/subproviders/test/unit/ledger_subprovider_test.ts b/packages/subproviders/test/unit/ledger_subprovider_test.ts
index d3efb6abc..bd1dad1f9 100644
--- a/packages/subproviders/test/unit/ledger_subprovider_test.ts
+++ b/packages/subproviders/test/unit/ledger_subprovider_test.ts
@@ -48,7 +48,7 @@ describe('LedgerSubprovider', () => {
};
return ecSignature;
},
- signTransaction: async (derivationPath: string, txHex: string) => {
+ signTransaction: async (_derivationPath: string, _txHex: string) => {
const ecSignature = {
v: '77',
r: '88a95ef1378487bc82be558e82c8478baf840c545d5b887536bb1da63673a98b',
@@ -193,7 +193,7 @@ describe('LedgerSubprovider', () => {
params: [FAKE_ADDRESS, nonHexMessage],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -208,7 +208,7 @@ describe('LedgerSubprovider', () => {
params: [nonHexMessage, FAKE_ADDRESS],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -226,7 +226,7 @@ describe('LedgerSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
@@ -245,7 +245,7 @@ describe('LedgerSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
diff --git a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
index 794c40d1d..331e52ea1 100644
--- a/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/mnemonic_wallet_subprovider_test.ts
@@ -130,7 +130,7 @@ describe('MnemonicWalletSubprovider', () => {
params: [fixtureData.TEST_RPC_ACCOUNT_0, nonHexMessage],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -145,7 +145,7 @@ describe('MnemonicWalletSubprovider', () => {
params: [nonHexMessage, fixtureData.TEST_RPC_ACCOUNT_0],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -160,7 +160,7 @@ describe('MnemonicWalletSubprovider', () => {
params: [messageHex, fixtureData.NULL_ADDRESS],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(
`${WalletSubproviderErrors.AddressNotFound}: ${fixtureData.NULL_ADDRESS}`,
@@ -180,7 +180,7 @@ describe('MnemonicWalletSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
@@ -199,7 +199,7 @@ describe('MnemonicWalletSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
diff --git a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
index 2475dde7a..d799bce9e 100644
--- a/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
+++ b/packages/subproviders/test/unit/nonce_tracker_subprovider_test.ts
@@ -41,7 +41,7 @@ describe('NonceTrackerSubprovider', () => {
let isFirstGetTransactionCount = true;
const fixedBlockNumberAndTransactionCountProvider = new FixtureSubprovider({
eth_getBlockByNumber: '0x01',
- eth_getTransactionCount: (data: any, next: any, end: any) => {
+ eth_getTransactionCount: (_data: any, _next: any, end: any) => {
// For testing caching we return different results on the second call
if (isFirstGetTransactionCount) {
isFirstGetTransactionCount = false;
@@ -88,7 +88,7 @@ describe('NonceTrackerSubprovider', () => {
provider.addProvider(createFixtureSubprovider());
provider.addProvider(
new FixtureSubprovider({
- eth_sendRawTransaction: (data: any, next: any, end: any) => {
+ eth_sendRawTransaction: (_data: any, _next: any, end: any) => {
end(new Error('Transaction nonce is too low'));
},
}),
@@ -123,7 +123,7 @@ describe('NonceTrackerSubprovider', () => {
provider.addProvider(createFixtureSubprovider());
provider.addProvider(
new FixtureSubprovider({
- eth_sendRawTransaction: (data: any, next: any, end: any) => {
+ eth_sendRawTransaction: (_data: any, _next: any, end: any) => {
end(null);
},
}),
diff --git a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
index ef7919801..34295c25e 100644
--- a/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
+++ b/packages/subproviders/test/unit/private_key_wallet_subprovider_test.ts
@@ -101,7 +101,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [fixtureData.TEST_RPC_ACCOUNT_0, nonHexMessage],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -116,7 +116,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [nonHexMessage, fixtureData.TEST_RPC_ACCOUNT_0],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal('Expected data to be of type HexString, encountered: hello world');
done();
@@ -131,7 +131,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [messageHex, fixtureData.TEST_RPC_ACCOUNT_1],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(
`Requested to sign message with address: ${
@@ -153,7 +153,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
@@ -172,7 +172,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [tx],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(WalletSubproviderErrors.SenderInvalidOrNotSupplied);
done();
@@ -187,7 +187,7 @@ describe('PrivateKeyWalletSubprovider', () => {
params: [messageHex, '0x0'],
id: 1,
};
- const callback = reportCallbackErrors(done)((err: Error, response: JSONRPCResponsePayload) => {
+ const callback = reportCallbackErrors(done)((err: Error, _response: JSONRPCResponsePayload) => {
expect(err).to.not.be.a('null');
expect(err.message).to.be.equal(`Expected address to be of type ETHAddressHex, encountered: 0x0`);
done();