From: Chris Duncan Date: Sun, 9 Aug 2026 19:12:44 +0000 (-0700) Subject: Remove extra brace and redundant type check. X-Git-Url: https://git.codecow.com/?a=commitdiff_plain;h=7fe1436890576a70a93b023a6be62c2cb74bd65c;p=libnemo.git Remove extra brace and redundant type check. --- diff --git a/src/lib/account/refresh.ts b/src/lib/account/refresh.ts index 9e4ce59..5f62e73 100644 --- a/src/lib/account/refresh.ts +++ b/src/lib/account/refresh.ts @@ -40,7 +40,6 @@ 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') { throw new Error('Confirmed frontier block info contents not found') } @@ -74,9 +73,6 @@ export async function _refresh (account: Account, rpc: unknown): Promise { throw new Error('Frontier block info subtype not found') } const frontierSubtype = resFrontierBlockInfo.subtype - if (!['change', 'epoch', 'open', 'receive', 'send'].includes(frontierSubtype)) { - throw new RangeError('Invalid subtype for frontier block', { cause: frontierSubtype }) - } if (!('contents' in resFrontierBlockInfo) || resFrontierBlockInfo.contents == null || typeof resFrontierBlockInfo.contents !== 'object') { throw new Error('Frontier block info contents not found') }