diff options
author | Fabio Berger <me@fabioberger.com> | 2018-05-16 22:18:47 +0800 |
---|---|---|
committer | Fabio Berger <me@fabioberger.com> | 2018-05-16 22:18:47 +0800 |
commit | 78623ae3bdba39b629a22aa2d15d8aee5e6225ab (patch) | |
tree | f44871dc1b081669c83cf041cebe559ecb57bace /packages/subproviders/src | |
parent | 136c6d01b3f01e6db8aab01c4b4b7315abadba24 (diff) | |
parent | 4de6221825447e77d7b1ee6bab28ce3407939301 (diff) | |
download | dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar.gz dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar.bz2 dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar.lz dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar.xz dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.tar.zst dexon-sol-tools-78623ae3bdba39b629a22aa2d15d8aee5e6225ab.zip |
Merge branch 'development' into v2-prototype
* development: (29 commits)
Do not remove artifacts when running `clean`
fix style errors
Fix circular dependency
Add my profile image to images
Add myself to about page
Add dogfood configs to website
Revert to lerna:run lint
Do lint sequentially
Exclude monorepo-scripts from tslint as test
Fix prettier
Add hover state to top tokens
Change to weekly txn volume
Change minimum Node version to 6.12
Document Node.js version requirement and add it to package.json
Apply prettier to some files which were not formatted correctly
Fix TSLint issues
Fix TSLint issues
Update ethereeumjs-testrpc to ganache-cli
Fix infinite loop
Add changelog entries for packages where executable binary exporting fixed
...
# Conflicts:
# packages/contracts/package.json
# packages/contracts/util/formatters.ts
# packages/contracts/util/signed_order_utils.ts
# packages/migrations/package.json
# yarn.lock
Diffstat (limited to 'packages/subproviders/src')
8 files changed, 11 insertions, 11 deletions
diff --git a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts index f68d7eb29..a04be68e1 100644 --- a/packages/subproviders/src/subproviders/base_wallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/base_wallet_subprovider.ts @@ -8,13 +8,13 @@ import { Callback, ErrorCallback, PartialTxParams, ResponseWithTxParams, WalletS import { Subprovider } from './subprovider'; export abstract class BaseWalletSubprovider extends Subprovider { - protected static _validateTxParams(txParams: PartialTxParams) { + protected static _validateTxParams(txParams: PartialTxParams): void { if (!_.isUndefined(txParams.to)) { assert.isETHAddressHex('to', txParams.to); } assert.isHexString('nonce', txParams.nonce); } - private static _validateSender(sender: string) { + private static _validateSender(sender: string): void { if (_.isUndefined(sender) || !addressUtils.isAddress(sender)) { throw new Error(WalletSubproviderErrors.SenderInvalidOrNotSupplied); } @@ -33,7 +33,7 @@ export abstract class BaseWalletSubprovider extends Subprovider { * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:async-suffix - public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) { + public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> { let accounts; let txParams; switch (payload.method) { diff --git a/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts b/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts index 8f152dc0a..bd7a4b6d9 100644 --- a/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts +++ b/packages/subproviders/src/subproviders/empty_wallet_subprovider.ts @@ -18,7 +18,7 @@ export class EmptyWalletSubprovider extends Subprovider { * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix - public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) { + public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> { switch (payload.method) { case 'eth_accounts': end(null, []); diff --git a/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts b/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts index 54fd7bcb9..6c49f20cf 100644 --- a/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts +++ b/packages/subproviders/src/subproviders/fake_gas_estimate_subprovider.ts @@ -32,7 +32,7 @@ export class FakeGasEstimateSubprovider extends Subprovider { * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix - public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) { + public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> { switch (payload.method) { case 'eth_estimateGas': end(null, this._constantGasAmount); diff --git a/packages/subproviders/src/subproviders/ganache.ts b/packages/subproviders/src/subproviders/ganache.ts index debd7ecf0..9ab764048 100644 --- a/packages/subproviders/src/subproviders/ganache.ts +++ b/packages/subproviders/src/subproviders/ganache.ts @@ -28,7 +28,7 @@ export class GanacheSubprovider extends Subprovider { * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix - public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) { + public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> { this._ganacheProvider.sendAsync(payload, (err: Error | null, result: any) => { end(err, result && result.result); }); diff --git a/packages/subproviders/src/subproviders/injected_web3.ts b/packages/subproviders/src/subproviders/injected_web3.ts index 3ca0c4bd0..73b870cd5 100644 --- a/packages/subproviders/src/subproviders/injected_web3.ts +++ b/packages/subproviders/src/subproviders/injected_web3.ts @@ -31,7 +31,7 @@ export class InjectedWeb3Subprovider extends Subprovider { * @param end Callback to call if subprovider handled the request and wants to pass back the request. */ // tslint:disable-next-line:prefer-function-over-method async-suffix - public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback) { + public async handleRequest(payload: JSONRPCRequestPayload, next: Callback, end: ErrorCallback): Promise<void> { switch (payload.method) { case 'web3_clientVersion': this._injectedWeb3.version.getNode(end); diff --git a/packages/subproviders/src/subproviders/ledger.ts b/packages/subproviders/src/subproviders/ledger.ts index 563e5a56a..347eda55f 100644 --- a/packages/subproviders/src/subproviders/ledger.ts +++ b/packages/subproviders/src/subproviders/ledger.ts @@ -74,7 +74,7 @@ export class LedgerSubprovider extends BaseWalletSubprovider { * Set a desired derivation path when computing the available user addresses * @param basDerivationPath The desired derivation path (e.g `44'/60'/0'`) */ - public setPath(basDerivationPath: string) { + public setPath(basDerivationPath: string): void { this._baseDerivationPath = basDerivationPath; } /** @@ -192,7 +192,7 @@ export class LedgerSubprovider extends BaseWalletSubprovider { this._connectionLock.release(); return ledgerEthereumClient; } - private async _destroyLedgerClientAsync() { + private async _destroyLedgerClientAsync(): Promise<void> { await this._connectionLock.acquire(); if (_.isUndefined(this._ledgerClientIfExists)) { this._connectionLock.release(); diff --git a/packages/subproviders/src/subproviders/mnemonic_wallet.ts b/packages/subproviders/src/subproviders/mnemonic_wallet.ts index 080bfeb4c..f29864a74 100644 --- a/packages/subproviders/src/subproviders/mnemonic_wallet.ts +++ b/packages/subproviders/src/subproviders/mnemonic_wallet.ts @@ -56,7 +56,7 @@ export class MnemonicWalletSubprovider extends BaseWalletSubprovider { * Set a desired derivation path when computing the available user addresses * @param baseDerivationPath The desired derivation path (e.g `44'/60'/0'`) */ - public setPath(baseDerivationPath: string) { + public setPath(baseDerivationPath: string): void { this._baseDerivationPath = baseDerivationPath; this._derivedKeyInfo = this._initialDerivedKeyInfo(this._baseDerivationPath); } diff --git a/packages/subproviders/src/subproviders/subprovider.ts b/packages/subproviders/src/subproviders/subprovider.ts index 2118f52c8..56d2381a0 100644 --- a/packages/subproviders/src/subproviders/subprovider.ts +++ b/packages/subproviders/src/subproviders/subprovider.ts @@ -11,7 +11,7 @@ export abstract class Subprovider { // tslint:disable-next-line:underscore-private-and-protected private engine: any; // Ported from: https://github.com/MetaMask/provider-engine/blob/master/util/random-id.js - private static _getRandomId() { + private static _getRandomId(): number { const extraDigits = 3; // 13 time digits const datePart = new Date().getTime() * Math.pow(10, extraDigits); |