Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Unreleased (develop)

- fixed: Staked "locked" balance in the wallet view no longer gets cut off. The crypto amount is truncated to an exchange-rate-appropriate number of decimals, and the text is no longer clamped to a fraction of the card width.

## 4.50.0 (2026-07-21)

- added: Changelly swap provider
Expand Down
27 changes: 15 additions & 12 deletions src/components/themed/TransactionListTop.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ import type {
WalletsTabSceneProps
} from '../../types/routerTypes'
import { CryptoAmount } from '../../util/CryptoAmount'
import { getCryptoText } from '../../util/cryptoTextUtils'
import { isKeysOnlyPlugin } from '../../util/CurrencyInfoHelpers'
import { triggerHaptic } from '../../util/haptic'
import {
Expand All @@ -55,6 +56,7 @@ import { getUkCompliantString } from '../../util/ukComplianceUtils'
import {
convertNativeToDenomination,
DECIMAL_PRECISION,
getDenomFromIsoCode,
removeIsoPrefix,
zeroString
} from '../../util/utils'
Expand Down Expand Up @@ -587,12 +589,16 @@ export const TransactionListTop: React.FC<Props> = props => {
const nativeLocked = add(fioStatus.locked, lockedNativeAmount)
if (nativeLocked === '0') return null

const stakingCryptoAmount = convertNativeToDenomination(
displayDenomination.multiplier
)(nativeLocked)
const stakingCryptoAmountFormat = formatNumber(
add(stakingCryptoAmount, '0')
)
// Truncate to an exchange-rate-appropriate number of decimals, so the
// whole "locked" message stays readable on narrow screens:
const stakingCryptoText = getCryptoText({
currencyCode: displayDenomination.name,
displayDenomination,
exchangeDenomination,
exchangeRate,
fiatDenomination: getDenomFromIsoCode(defaultIsoFiat),
nativeAmount: nativeLocked
})

const stakingExchangeAmount = convertNativeToDenomination(
exchangeDenomination.multiplier
Expand All @@ -608,7 +614,7 @@ export const TransactionListTop: React.FC<Props> = props => {
<EdgeText style={styles.stakingStatusText}>
{sprintf(
lstrings.staking_status,
stakingCryptoAmountFormat + ' ' + displayDenomination.name,
stakingCryptoText,
fiatSymbol + stakingFiatBalanceFormat + ' ' + defaultFiat
)}
</EdgeText>
Expand Down Expand Up @@ -909,15 +915,12 @@ const getStyles = cacheStyles((theme: Theme) => ({
// Staking Box
stakingBoxContainer: {
height: theme.rem(1.25),
minWidth: theme.rem(18),
maxWidth: '70%',
alignItems: 'center',
flexDirection: 'row',
justifyContent: 'space-between'
flexDirection: 'row'
},
stakingStatusText: {
flexShrink: 1,
color: theme.secondaryText,
maxWidth: '70%',
fontSize: theme.rem(1)
}
}))
Loading