Skip to content

Commit d2a3596

Browse files
committed
moving chain verification into lib utilities
1 parent 3970614 commit d2a3596

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

federator/src/lib/utils.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,10 +148,10 @@ function checkIfItsInRSK(chainId = -1) {
148148
chainId === 33;
149149
}
150150

151-
async function getHeartbeatPollingInterval(host) {
151+
async function getHeartbeatPollingInterval({host, runHeartbeatEvery}) {
152152
const web3 = new Web3(host);
153153
const chainId = await web3.eth.net.getId();
154-
const pollingInterval = [1, 30, 31, 42].includes(chainId) ? 1000 * 60 * 60 : null;
154+
const pollingInterval = [30, 31].includes(chainId) ? 1000 * 60 * 60 : runHeartbeatEvery * 1000 * 60;
155155
return pollingInterval;
156156
}
157157

0 commit comments

Comments
 (0)