diff --git a/apps/explorer/src/api/operator/accountOrderUtils.ts b/apps/explorer/src/api/operator/accountOrderUtils.ts index 7d22364925..7d794e7602 100644 --- a/apps/explorer/src/api/operator/accountOrderUtils.ts +++ b/apps/explorer/src/api/operator/accountOrderUtils.ts @@ -1,5 +1,4 @@ -import { SupportedChainId } from '@cowprotocol/cow-sdk' -import { EnrichedOrder } from '@cowprotocol/cow-sdk' +import { EnrichedOrder, SupportedChainId } from '@cowprotocol/cow-sdk' import { orderBookSDK } from 'cowSdk' @@ -30,7 +29,7 @@ export async function getAccountOrders(params: GetAccountOrdersParams): Promise< const ordersPromise = state.prodHasNext ? orderBookSDK.getOrders({ owner, offset, limit: limitPlusOne }, { chainId: networkId }).catch((error) => { - console.error('[getAccountOrders] Error getting PROD orders for account', owner, networkId, error) + console.error('[getAccountOrders] Error getting PROD orders for account ', owner, error) return [] }) : [] @@ -39,7 +38,7 @@ export async function getAccountOrders(params: GetAccountOrdersParams): Promise< ? orderBookSDK .getOrders({ owner, offset, limit: limitPlusOne }, { chainId: networkId, env: 'staging' }) .catch((error) => { - console.error('[getAccountOrders] Error getting orders for account', owner, networkId, error) + console.error('[getAccountOrders] Error getting BARN orders for account', owner, networkId, error) return [] }) : [] diff --git a/apps/explorer/src/api/operator/operatorApi.ts b/apps/explorer/src/api/operator/operatorApi.ts index 1e7df919e8..8194433f7a 100644 --- a/apps/explorer/src/api/operator/operatorApi.ts +++ b/apps/explorer/src/api/operator/operatorApi.ts @@ -2,7 +2,7 @@ import { Address, UID } from '@cowprotocol/cow-sdk' import { orderBookSDK } from 'cowSdk' -import { GetOrderParams, RawOrder, RawTrade, GetTxOrdersParams, WithNetworkId } from './types' +import { GetOrderParams, GetTxOrdersParams, RawOrder, RawTrade, WithNetworkId } from './types' export { getAccountOrders } from './accountOrderUtils' @@ -53,11 +53,14 @@ export async function getTrades( const { networkId, owner, orderId: orderUid } = params console.log(`[getTrades] Fetching trades on network ${networkId} with filters`, { owner, orderUid }) - const tradesPromise = orderBookSDK.getTrades({ owner, orderUid }, { chainId: networkId }) + const tradesPromise = orderBookSDK.getTrades({ owner, orderUid }, { chainId: networkId }).catch((error) => { + console.error('[getTrades] Error getting PROD trades', params, error) + return [] + }) const tradesPromiseBarn = orderBookSDK .getTrades({ owner, orderUid }, { chainId: networkId, env: 'staging' }) .catch((error) => { - console.error('[getTrades] Error getting the trades for Barn', params, error) + console.error('[getTrades] Error getting BARN trades', params, error) return [] })