@toruslabs/ethereum-controllers 4.9.1 → 4.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/ethereumControllers.cjs.js +5 -6
- package/dist/ethereumControllers.cjs.js.map +1 -1
- package/dist/ethereumControllers.esm.js +4 -6
- package/dist/ethereumControllers.esm.js.map +1 -1
- package/dist/ethereumControllers.umd.min.js +1 -1
- package/dist/ethereumControllers.umd.min.js.map +1 -1
- package/dist/types/Network/createJsonRpcClient.d.ts +2 -1
- package/dist/types/utils/interfaces.d.ts +2 -2
- package/package.json +4 -4
- package/src/Network/NetworkController.ts +1 -1
- package/src/Network/createJsonRpcClient.ts +6 -2
- package/src/utils/interfaces.ts +2 -1
|
@@ -3369,6 +3369,7 @@ function createEthereumMiddleware(providerHandlers) {
|
|
|
3369
3369
|
|
|
3370
3370
|
|
|
3371
3371
|
|
|
3372
|
+
|
|
3372
3373
|
function createChainIdMiddleware(chainId) {
|
|
3373
3374
|
return (req, res, next, end) => {
|
|
3374
3375
|
if (req.method === "eth_chainId") {
|
|
@@ -3392,7 +3393,7 @@ function createProviderConfigMiddleware(providerConfig) {
|
|
|
3392
3393
|
return next();
|
|
3393
3394
|
};
|
|
3394
3395
|
}
|
|
3395
|
-
function createJsonRpcClient(providerConfig) {
|
|
3396
|
+
function createJsonRpcClient(providerConfig, networkConfig) {
|
|
3396
3397
|
const {
|
|
3397
3398
|
chainId,
|
|
3398
3399
|
rpcTarget
|
|
@@ -3402,9 +3403,9 @@ function createJsonRpcClient(providerConfig) {
|
|
|
3402
3403
|
});
|
|
3403
3404
|
const blockProvider = (0,openlogin_jrpc_namespaceObject.providerFromMiddleware)(fetchMiddleware);
|
|
3404
3405
|
const blockTracker = new Block_PollingBlockTracker({
|
|
3405
|
-
config: {
|
|
3406
|
+
config: objectSpread2_default()(objectSpread2_default()({}, networkConfig), {}, {
|
|
3406
3407
|
provider: blockProvider
|
|
3407
|
-
},
|
|
3408
|
+
}),
|
|
3408
3409
|
state: {}
|
|
3409
3410
|
});
|
|
3410
3411
|
const networkMiddleware = (0,openlogin_jrpc_namespaceObject.mergeMiddleware)([createChainIdMiddleware(chainId), createProviderConfigMiddleware(providerConfig),
|
|
@@ -3606,7 +3607,7 @@ class NetworkController extends base_controllers_namespaceObject.BaseController
|
|
|
3606
3607
|
this.blockTracker = blockTracker;
|
|
3607
3608
|
}
|
|
3608
3609
|
configureStandardProvider(providerConfig) {
|
|
3609
|
-
const networkClient = createJsonRpcClient(providerConfig);
|
|
3610
|
+
const networkClient = createJsonRpcClient(providerConfig, this.config);
|
|
3610
3611
|
external_loglevel_default().info("networkClient", networkClient);
|
|
3611
3612
|
this.setNetworkClient(networkClient);
|
|
3612
3613
|
}
|
|
@@ -5615,7 +5616,6 @@ function getFinalStates() {
|
|
|
5615
5616
|
base_controllers_namespaceObject.TransactionStatus.dropped // the tx nonce was already used
|
|
5616
5617
|
];
|
|
5617
5618
|
}
|
|
5618
|
-
|
|
5619
5619
|
function parseStandardTokenTransactionData(data) {
|
|
5620
5620
|
try {
|
|
5621
5621
|
const txDesc = erc20Interface.parseTransaction({
|
|
@@ -6078,7 +6078,6 @@ class TransactionController extends TransactionStateManager {
|
|
|
6078
6078
|
getConfirmedTransactions: this.getConfirmedTransactions.bind(this),
|
|
6079
6079
|
getPendingTransactions: this.getSubmittedTransactions.bind(this) // nonce tracker should only care about submitted transactions
|
|
6080
6080
|
});
|
|
6081
|
-
|
|
6082
6081
|
this.pendingTxTracker = new PendingTransactionTracker({
|
|
6083
6082
|
provider,
|
|
6084
6083
|
nonceTracker: this.nonceTracker,
|