From b9bc21fd4cbf783f122a7c1331872118a874cdd2 Mon Sep 17 00:00:00 2001 From: Linkie Link Date: Wed, 31 Jan 2024 14:45:25 +0100 Subject: [PATCH] fix: fixed merge errors --- src/hooks/markets/useMarketAssets.ts | 14 -------------- src/hooks/markets/useMarketBorrowings.tsx | 17 ----------------- src/hooks/markets/useMarketLiquidities.ts | 17 ----------------- src/store/slices/broadcast.ts | 3 ++- 4 files changed, 2 insertions(+), 49 deletions(-) delete mode 100644 src/hooks/markets/useMarketAssets.ts delete mode 100644 src/hooks/markets/useMarketBorrowings.tsx delete mode 100644 src/hooks/markets/useMarketLiquidities.ts diff --git a/src/hooks/markets/useMarketAssets.ts b/src/hooks/markets/useMarketAssets.ts deleted file mode 100644 index 150acc47..00000000 --- a/src/hooks/markets/useMarketAssets.ts +++ /dev/null @@ -1,14 +0,0 @@ -import useSWR from 'swr' -import getMarkets from 'api/markets/getMarkets' - -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketAssets() { - const chainConfig = useChainConfig() - return useSWR(`chains/${chainConfig.id}/markets`, () => getMarkets(chainConfig), { - suspense: true, - fallbackData: [], - revalidateOnFocus: false, - keepPreviousData: false, - }) -} diff --git a/src/hooks/markets/useMarketBorrowings.tsx b/src/hooks/markets/useMarketBorrowings.tsx deleted file mode 100644 index 903774ce..00000000 --- a/src/hooks/markets/useMarketBorrowings.tsx +++ /dev/null @@ -1,17 +0,0 @@ -import useSWR from 'swr' -import getMarketBorrowings from 'api/markets/getMarketBorrowings' - -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketBorrowings() { - const chainConfig = useChainConfig() - return useSWR( - `chains/${chainConfig.id}/markets/borrowings`, - () => getMarketBorrowings(chainConfig), - { - fallbackData: [], - suspense: false, - revalidateOnFocus: false, - }, - ) -} diff --git a/src/hooks/markets/useMarketLiquidities.ts b/src/hooks/markets/useMarketLiquidities.ts deleted file mode 100644 index 075d5145..00000000 --- a/src/hooks/markets/useMarketLiquidities.ts +++ /dev/null @@ -1,17 +0,0 @@ -import useSWR from 'swr' -import getMarketLiquidities from 'api/markets/getMarketLiquidities' - -import useChainConfig from 'hooks/useChainConfig' - -export default function useMarketLiquidities() { - const chainConfig = useChainConfig() - return useSWR( - `chains/${chainConfig.id}/markets/liquidities`, - () => getMarketLiquidities(chainConfig), - { - suspense: true, - fallbackData: [], - revalidateOnFocus: false, - }, - ) -} diff --git a/src/store/slices/broadcast.ts b/src/store/slices/broadcast.ts index d4080ac5..90c4f749 100644 --- a/src/store/slices/broadcast.ts +++ b/src/store/slices/broadcast.ts @@ -183,9 +183,10 @@ export default function createBroadcastSlice( }) if (simulateResult) { - const { success, fee } = simulateResult + const { success } = simulateResult if (success) { + const fee = simulateResult.fee return { amount: fee ? fee.amount : [], gas: BN(fee ? fee.gas : 0).toFixed(0),