Track per-provider JSON-RPC ID (#)

This commit is contained in:
Richard Moore 2019-05-24 15:31:30 -04:00
parent 47d92aeff0
commit 044554b585
No known key found for this signature in database
GPG Key ID: 525F70A6FCABC295

@ -211,6 +211,7 @@ export class JsonRpcProvider extends BaseProvider {
readonly connection: ConnectionInfo;
_pendingFilter: Promise<number>;
_nextId: number;
constructor(url?: ConnectionInfo | string, network?: Networkish) {
errors.checkNew(new.target, JsonRpcProvider);
@ -257,6 +258,7 @@ export class JsonRpcProvider extends BaseProvider {
this.connection = url;
}
this._nextId = 42;
}
getSigner(addressOrIndex?: string | number): JsonRpcSigner {
@ -277,7 +279,7 @@ export class JsonRpcProvider extends BaseProvider {
let request = {
method: method,
params: params,
id: 42,
id: (this._nextId++),
jsonrpc: "2.0"
};