Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: release v1.521.0 #6046

Merged
merged 2 commits into from
Jan 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions src/assets/translations/en/main.json
Original file line number Diff line number Diff line change
Expand Up @@ -2211,6 +2211,7 @@
"awaitingConfirmation": "Awaiting confirmation",
"transactionSubmitted": "Transaction submitted",
"waitingForConfirmation": "Waiting for Confirmation",
"totalTokensLocked": "Total Tokens Locked",
"chainFee": "%{chain} Fee",
"supplying": "Supplying",
"confirmAndDeposit": "Confirm and Deposit",
Expand Down
7 changes: 6 additions & 1 deletion src/components/Amount/Amount.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,18 @@ const Crypto = ({
prefix,
suffix,
omitDecimalTrailingZeros = false,
abbreviated = false,
...props
}: CryptoAmountProps) => {
const {
number: { toCrypto, toParts },
} = useLocaleFormatter()

const crypto = toCrypto(value, symbol, { maximumFractionDigits, omitDecimalTrailingZeros })
const crypto = toCrypto(value, symbol, {
maximumFractionDigits,
omitDecimalTrailingZeros,
abbreviated,
})

if (!cryptoSymbolStyle) {
return (
Expand Down
10 changes: 8 additions & 2 deletions src/lib/utils/thorchain/lp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export const calculateTVL = (
assetDepthCryptoBaseUnit: string,
runeDepthCryptoBaseUnit: string,
runePrice: string,
): string => {
): { tvl: string; assetAmountCrytoPrecision: string; runeAmountCryptoPrecision: string } => {
const assetDepthCryptoPrecision = fromThorBaseUnit(assetDepthCryptoBaseUnit)
const runeDepthCryptoPrecision = fromThorBaseUnit(runeDepthCryptoBaseUnit)

Expand All @@ -123,7 +123,13 @@ export const calculateTVL = (

const tvl = assetValueFiatUserCurrency.plus(runeValueFiatUserCurrency).times(2)

return tvl.toFixed()
const result = {
tvl: tvl.toFixed(),
assetAmountCrytoPrecision: assetDepthCryptoPrecision.toFixed(),
runeAmountCryptoPrecision: runeDepthCryptoPrecision.toFixed(),
}

return result
}

export const getVolume = async (
Expand Down
2 changes: 1 addition & 1 deletion src/pages/ThorChainLP/AvailablePools.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ const PoolButton = ({ pool }: PoolButtonProps) => {
const runeMarketData = useAppSelector(state => selectMarketDataById(state, thorchainAssetId))

const tvl = useMemo(
() => calculateTVL(pool.assetDepth, pool.runeDepth, runeMarketData.price),
() => calculateTVL(pool.assetDepth, pool.runeDepth, runeMarketData.price).tvl,
[pool.assetDepth, pool.runeDepth, runeMarketData.price],
)

Expand Down