diff --git a/backend/src/api/bitcoin/bitcoin-api.ts b/backend/src/api/bitcoin/bitcoin-api.ts index 603a15a70..c5e38da57 100644 --- a/backend/src/api/bitcoin/bitcoin-api.ts +++ b/backend/src/api/bitcoin/bitcoin-api.ts @@ -42,10 +42,7 @@ class BitcoinApi implements AbstractBitcoinApi { $getBlockHeightTip(): Promise { return this.bitcoindClient.getChainTips() .then((result: IBitcoinApi.ChainTips[]) => { - const activeTip = result.find(tip => tip.status === 'active'); - if (activeTip) { - return activeTip.height; - } + return result.find(tip => tip.status === 'active')!.height; }); }