fix: fixed merge errors
This commit is contained in:
parent
0dc17e3263
commit
b9bc21fd4c
@ -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,
|
|
||||||
})
|
|
||||||
}
|
|
@ -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,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
@ -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,
|
|
||||||
},
|
|
||||||
)
|
|
||||||
}
|
|
@ -183,9 +183,10 @@ export default function createBroadcastSlice(
|
|||||||
})
|
})
|
||||||
|
|
||||||
if (simulateResult) {
|
if (simulateResult) {
|
||||||
const { success, fee } = simulateResult
|
const { success } = simulateResult
|
||||||
|
|
||||||
if (success) {
|
if (success) {
|
||||||
|
const fee = simulateResult.fee
|
||||||
return {
|
return {
|
||||||
amount: fee ? fee.amount : [],
|
amount: fee ? fee.amount : [],
|
||||||
gas: BN(fee ? fee.gas : 0).toFixed(0),
|
gas: BN(fee ? fee.gas : 0).toFixed(0),
|
||||||
|
Loading…
Reference in New Issue
Block a user