File tree Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Expand file tree Collapse file tree 4 files changed +21
-19
lines changed Original file line number Diff line number Diff line change 11{
22 "name" : " app" ,
3- "version" : " 2.14.24 " ,
3+ "version" : " 2.14.26 " ,
44 "private" : true ,
55 "scripts" : {
66 "bump" : " bump patch --tag --commit 'testnet release '" ,
Original file line number Diff line number Diff line change @@ -54,16 +54,17 @@ export const useLiquidityProviderQuery = (
5454 services . chains . get ( Network . SIFCHAIN ) ,
5555 ) ;
5656
57- const liquidityProvider =
58- await sifchainClients . queryClient . clp . GetLiquidityProvider ( {
59- lpAddress : walletAddress ,
60- symbol : externalAssetEntryQuery . data . value ?. denom ?? "" ,
61- } ) ;
57+ const liquidityProvider = externalAssetEntryQuery . data . value ?. denom
58+ ? await sifchainClients . queryClient . clp . GetLiquidityProvider ( {
59+ lpAddress : walletAddress ,
60+ symbol : externalAssetEntryQuery . data . value ?. denom ,
61+ } )
62+ : null ;
6263
6364 const currentHeight = await sifchainClients . signingClient . getHeight ( ) ;
6465
6566 const lpWithAddedDetails =
66- liquidityProvider . liquidityProvider === undefined ||
67+ liquidityProvider ? .liquidityProvider === undefined ||
6768 rewardsParamsQuery . data . value ?. params === undefined
6869 ? undefined
6970 : addDetailToLiquidityProvider (
Original file line number Diff line number Diff line change @@ -15,17 +15,17 @@ export const useUnlockLiquidityByPercentage = (
1515 const tokenEntries = useTokenRegistryEntriesQuery ( ) ;
1616
1717 return computed ( ( ) => {
18- if ( ! isNil ( lpQuery . error . value ) || ! isNil ( tokenEntries . error . value ) ) {
18+ if ( ! isNil ( lpQuery ? .error . value ) || ! isNil ( tokenEntries . error . value ) ) {
1919 return { status : "rejected" as const } ;
2020 }
2121
22- if ( lpQuery . isLoading . value || tokenEntries . isLoading . value ) {
22+ if ( lpQuery ? .isLoading . value || tokenEntries . isLoading . value ) {
2323 return { status : "pending" as const } ;
2424 }
2525
26- const externalAssetBalance = lpQuery . data . value ?. externalAssetBalance ;
27- const nativeAssetBalance = lpQuery . data . value ?. nativeAssetBalance ;
28- const lp = lpQuery . data . value ?. liquidityProvider ;
26+ const externalAssetBalance = lpQuery ? .data . value ?. externalAssetBalance ;
27+ const nativeAssetBalance = lpQuery ? .data . value ?. nativeAssetBalance ;
28+ const lp = lpQuery ? .data . value ?. liquidityProvider ;
2929
3030 const externalAssetFractionalDigits =
3131 tokenEntries . data . value ?. registry ?. entries
Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import { useCurrentRewardPeriodStatistics } from "~/domains/clp/queries/params";
88import { useUnlockLiquidityByPercentage } from "~/domains/clp/queries/unlockLiquidityByPercentage" ;
99import { useAppWalletPicker } from "~/hooks/useAppWalletPicker" ;
1010import { useAssetBySymbol } from "~/hooks/useAssetBySymbol" ;
11- import { usePoolStats } from "~/hooks/usePoolStats" ;
11+ import { PoolStat , usePoolStats } from "~/hooks/usePoolStats" ;
1212import { useDeliverTxDetails } from "~/hooks/useTransactionDetails" ;
1313import { useWalletButton } from "~/hooks/useWalletButton" ;
1414import { accountStore } from "~/store/modules/accounts" ;
@@ -67,12 +67,13 @@ const UnbondLiquidity = defineComponent({
6767 . toNumber ( ) ,
6868 ) ;
6969
70- const externalAssetPriceUsd = computed (
71- ( ) =>
72- poolStats . data . value ?. poolData . pools . find (
73- ( x ) => x . symbol === externalAssetBaseDenom . value ,
74- ) ?. priceToken ,
75- ) ;
70+ const externalAssetPriceUsd = computed ( ( ) => {
71+ const poolData = poolStats . data ?. value ?. poolData ;
72+ const pools = poolData ?. pools as Record < string , PoolStat > ;
73+ return Object . values ( pools ) . find (
74+ ( x ) => x . symbol === externalAssetBaseDenom . value ,
75+ ) ?. priceToken ;
76+ } ) ;
7677
7778 const externalAssetWithdrawalUsd = computed ( ( ) => {
7879 return Amount ( withdrawData . withdrawExternalAssetAmount . value )
You can’t perform that action at this time.
0 commit comments