]> git.codecow.com Git - libnemo.git/commitdiff
Remove extra brace and redundant type check.
authorChris Duncan <chris@codecow.com>
Sun, 9 Aug 2026 19:12:44 +0000 (12:12 -0700)
committerChris Duncan <chris@codecow.com>
Sun, 9 Aug 2026 19:12:44 +0000 (12:12 -0700)
src/lib/account/refresh.ts

index 9e4ce59e14bd6ddb78d04fa1578b0f6a37736732..5f62e73a0651ec782e8bca6e0b9e4122ee4d0045 100644 (file)
@@ -40,7 +40,6 @@ export async function _refresh (account: Account, rpc: unknown): Promise<void> {
                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<void> {
                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')
        }