From: Chris Duncan Date: Tue, 4 Aug 2026 14:45:48 +0000 (-0700) Subject: Fix frontier block contents checks. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7728f94989dd95bcaa82c83b09c4172aba7a8683;p=libnemo.git Fix frontier block contents checks. --- diff --git a/src/lib/account/refresh.ts b/src/lib/account/refresh.ts index ae964f3..b79dd45 100644 --- a/src/lib/account/refresh.ts +++ b/src/lib/account/refresh.ts @@ -46,7 +46,7 @@ export async function _refresh (account: Account, rpc: unknown): Promise { throw new Error('Confirmed frontier block info subtype not found') } const confirmedFrontierSubtype = resConfirmedFrontierBlockInfo.subtype - if (!('contents' in resConfirmedFrontierBlockInfo) || resConfirmedFrontierBlockInfo.contents == null || !(typeof resConfirmedFrontierBlockInfo.contents !== 'object')) { + if (!('contents' in resConfirmedFrontierBlockInfo) || resConfirmedFrontierBlockInfo.contents == null || typeof resConfirmedFrontierBlockInfo.contents !== 'object') { throw new Error('Confirmed frontier block info contents not found') } const confirmedFrontierContents: Record = {} @@ -74,7 +74,7 @@ export async function _refresh (account: Account, rpc: unknown): Promise { throw new Error('Frontier block info subtype not found') } const frontierSubtype = resFrontierBlockInfo.subtype - if (!('contents' in resFrontierBlockInfo) || resFrontierBlockInfo.contents == null || !(typeof resFrontierBlockInfo.contents !== 'object')) { + if (!('contents' in resFrontierBlockInfo) || resFrontierBlockInfo.contents == null || typeof resFrontierBlockInfo.contents !== 'object') { throw new Error('Frontier block info contents not found') } const frontierContents: Record = {}