Skip to content

Commit

Permalink
final polish
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellorigotti committed May 29, 2024
1 parent 0e972c6 commit 8cd878e
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions config/sisyphos.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,11 +79,11 @@
"contracts": [
{
"alias": "key-manager",
"address": "0x5fbdb2315678afecb367f032d93f642f64180aa3"
"address": "0x7ea74208e2954a7294097c731434cad29c5094d8"
},
{
"alias": "vault",
"address": "0xe7f1725e7734ce288f8367e1bb143e90bb3f0512"
"address": "0x8155bdd48cd011e1118b51a1c82be020a3e5c2f2"
}
],
"wallets": [
Expand Down
4 changes: 2 additions & 2 deletions src/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,13 +119,13 @@ app.listen(env.NETWORK_EXPORTER_PORT || 9000, () => {
chain: 'arbitrum',
network: config.arb.network,
});
const arbitrumContrext: Context = createContext(
const arbitrumContext: Context = createContext(
arbitrumLogger,
arbitrumRegistry,
env,
config.arb,
);
startArbitrumService(arbitrumContrext);
startArbitrumService(arbitrumContext);
}
});

Expand Down
4 changes: 2 additions & 2 deletions src/watchers/arbitrum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,17 +39,17 @@ export default async function startArbitrumService(context: Context) {
}

process.on('uncaughtException', async (err) => {
if(!isExceptionCaught && !isWatcherRunning) {
if (!isExceptionCaught && !isWatcherRunning) {
loggerCopy.error(`Error opening ARB ws connection: ${err}`);
loggerCopy.info(`ARB retrying in 15s`);
await wsProvider.destroy();
setTimeout(() => {
isExceptionCaught = false;
startWatcher(mainContext); // Retry after a delay
}, 15000); // 15s
metric.set(1);
}
isExceptionCaught = true;
metric.set(1);
});

async function startWatcher(context: Context) {
Expand Down
2 changes: 1 addition & 1 deletion src/watchers/ethereum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ export default async function startEthereumService(context: Context) {
}

process.on('uncaughtException', async (err) => {
if(!isExceptionCaught && !isWatcherRunning) {
if (!isExceptionCaught && !isWatcherRunning) {
loggerCopy.error(`Error opening ETH ws connection: ${err}`);
loggerCopy.info(`ETH retrying in 15s`);
await wsProvider.destroy();
Expand Down

0 comments on commit 8cd878e

Please sign in to comment.