@gooddollar/bridge-app
Advanced tools
Comparing version 1.3.2 to 1.3.3
@@ -77,4 +77,2 @@ "use strict"; | ||
var _a; | ||
if (chainId === 122) | ||
rpc = FUSE_RPC || rpc; | ||
logger.info('initBlockchain', { chainId, rpc }); | ||
@@ -184,2 +182,5 @@ const provider = new ethers.providers.JsonRpcProvider(rpc); | ||
const rpcs = rpc.split(',').filter((_) => _.includes('ankr') === false); | ||
if (chainId.toNumber() === 122 && FUSE_RPC) { | ||
rpcs.push(FUSE_RPC); | ||
} | ||
const randomRpc = rpcs[(0, lodash_1.random)(0, rpcs.length - 1)]; | ||
@@ -224,2 +225,3 @@ return { chainId: chainId.toNumber(), rpc: randomRpc }; | ||
logger.error('failed adding blocks to registry:', { message: e.message, blocks }); | ||
_refreshRPCs(); | ||
} | ||
@@ -229,4 +231,5 @@ } | ||
logger.error('failed emitRegistry', { message: e.message }); | ||
_refreshRPCs(); | ||
} | ||
} | ||
exports.emitRegistry = emitRegistry; |
{ | ||
"name": "@gooddollar/bridge-app", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "Minimalistic bridge", | ||
@@ -5,0 +5,0 @@ "engines": { |
@@ -85,4 +85,2 @@ // import pino from 'pino' | ||
async function initBlockchain(chainId: number, rpc: string) { | ||
//on fuse use the local validator node rpc | ||
if (chainId === 122) rpc = FUSE_RPC || rpc; | ||
logger.info('initBlockchain', { chainId, rpc }); | ||
@@ -218,2 +216,6 @@ | ||
const rpcs = rpc.split(',').filter((_) => _.includes('ankr') === false); //currently removing ankr not behaving right with batchprovider | ||
if (chainId.toNumber() === 122 && FUSE_RPC) { | ||
//on fuse use the local validator node rpc | ||
rpcs.push(FUSE_RPC); | ||
} | ||
const randomRpc = rpcs[random(0, rpcs.length - 1)]; | ||
@@ -269,5 +271,9 @@ return { chainId: chainId.toNumber(), rpc: randomRpc }; | ||
logger.error('failed adding blocks to registry:', { message: e.message, blocks }); | ||
//recycle rpcs on error | ||
_refreshRPCs(); | ||
} | ||
} catch (e) { | ||
logger.error('failed emitRegistry', { message: e.message }); | ||
//recycle rpcs on error | ||
_refreshRPCs(); | ||
} | ||
@@ -274,0 +280,0 @@ } |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
736093
11526
0