diff --git a/apps/wallet-mobile/src/features/WalletManager/common/hooks/useBestBlock.tsx b/apps/wallet-mobile/src/features/WalletManager/common/hooks/useBestBlock.tsx index ca667fc087..aae3f8b8f8 100644 --- a/apps/wallet-mobile/src/features/WalletManager/common/hooks/useBestBlock.tsx +++ b/apps/wallet-mobile/src/features/WalletManager/common/hooks/useBestBlock.tsx @@ -11,7 +11,15 @@ export const useBestBlock = ({options}: {options?: UseQueryOptions networkManager.api.bestBlock(), + queryFn: () => + networkManager.api.bestBlock().catch(() => ({ + // TODO: Without this it break when offline. Needs better fixing + epoch: 510, + slot: 130081, + globalSlot: 135086881, + hash: 'ab0093eb78bcb0146355741388632eb50c69407df8fa32de85e5f198d725e8f4', + height: 10850697, + })), ...options, }) diff --git a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts index fb3ee1a9d8..29dbd086a9 100644 --- a/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts +++ b/apps/wallet-mobile/src/yoroi-wallets/hooks/index.ts @@ -440,7 +440,10 @@ export const useFrontendFees = ( suspense: true, queryKey: [wallet.id, 'frontend-fees'], ...options, - queryFn: () => wallet.api.getFrontendFees(), + queryFn: () => + wallet.api.getFrontendFees().catch(() => ({ + // TODO: Without this it break when offline. Needs better fixing + })), }) return {