Skip to content

Commit 8f1244a

Browse files
committed
Throw on startup if EVM_JSON_RPC is not set
1 parent d50a658 commit 8f1244a

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

src/staking-rewards/staking-rewards.service.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,10 @@ export class StakingRewardsService {
3434

3535
this.logger.log(`Initializing staking rewards service (IS_LIVE: ${this.isLive})`)
3636
const jsonRpc = this.config.get<string>('EVM_JSON_RPC', { infer: true })
37-
37+
if (!jsonRpc) {
38+
this.logger.error('Missing EVM JSON RPC URL')
39+
throw new Error('Missing EVM JSON RPC URL')
40+
}
3841
const provider = new ethers.JsonRpcProvider(jsonRpc)
3942

4043
const hodlerAddress = this.config.get<string>('HODLER_CONTRACT_ADDRESS', { infer: true })

0 commit comments

Comments
 (0)