aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFabio Berger <me@fabioberger.com>2018-04-11 15:48:56 +0800
committerFabio Berger <me@fabioberger.com>2018-04-11 15:48:56 +0800
commitde6f757ec821c6e735e0f5e8c2e5621b57c02f55 (patch)
tree349813b7270e755c7afd247e367f6952ec10ba93
parent3eeb8f4d6d5e6b301685b946719c9d6381a374eb (diff)
downloaddexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.gz
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.bz2
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.lz
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.xz
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.tar.zst
dexon-sol-tools-de6f757ec821c6e735e0f5e8c2e5621b57c02f55.zip
Introduce type JSONRpcErrorCallback
-rw-r--r--packages/types/src/index.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts
index 442fbb2d6..2e7e629b5 100644
--- a/packages/types/src/index.ts
+++ b/packages/types/src/index.ts
@@ -1,7 +1,9 @@
import { BigNumber } from 'bignumber.js';
+export type JSONRPCErrorCallback = (err: Error | null, result?: JSONRPCResponsePayload) => void;
+
export interface Provider {
- sendAsync(payload: JSONRPCRequestPayload, callback: (err: Error, result: JSONRPCResponsePayload) => void): void;
+ sendAsync(payload: JSONRPCRequestPayload, callback: JSONRPCErrorCallback): void;
}
export type ContractAbi = AbiDefinition[];