mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
hide price values on tx card+details view when incognito mode enabled
This commit is contained in:
parent
44523427e0
commit
643e0640c9
2 changed files with 43 additions and 37 deletions
|
@ -255,17 +255,19 @@ class _TransactionDetailsViewState
|
|||
const SizedBox(
|
||||
height: 2,
|
||||
),
|
||||
SelectableText(
|
||||
"${Format.localizedStringAsFixed(value: (coin == Coin.monero ? (amount / 10000.toDecimal()).toDecimal() : coin == Coin.wownero ? (amount / 1000.toDecimal()).toDecimal() : amount) * ref.watch(priceAnd24hChangeNotifierProvider.select((value) => value.getPrice(coin).item1)), locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
), decimalPlaces: 2)} ${ref.watch(
|
||||
prefsChangeNotifierProvider.select(
|
||||
(value) => value.currency,
|
||||
),
|
||||
)}",
|
||||
style: STextStyles.itemSubtitle(context),
|
||||
),
|
||||
if (ref.watch(prefsChangeNotifierProvider
|
||||
.select((value) => value.externalCalls)))
|
||||
SelectableText(
|
||||
"${Format.localizedStringAsFixed(value: (coin == Coin.monero ? (amount / 10000.toDecimal()).toDecimal() : coin == Coin.wownero ? (amount / 1000.toDecimal()).toDecimal() : amount) * ref.watch(priceAnd24hChangeNotifierProvider.select((value) => value.getPrice(coin).item1)), locale: ref.watch(
|
||||
localeServiceChangeNotifierProvider
|
||||
.select((value) => value.locale),
|
||||
), decimalPlaces: 2)} ${ref.watch(
|
||||
prefsChangeNotifierProvider.select(
|
||||
(value) => value.currency,
|
||||
),
|
||||
)}",
|
||||
style: STextStyles.itemSubtitle(context),
|
||||
),
|
||||
],
|
||||
),
|
||||
TxIcon(
|
||||
|
|
|
@ -202,35 +202,39 @@ class _TransactionCardState extends ConsumerState<TransactionCard> {
|
|||
),
|
||||
),
|
||||
),
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Builder(
|
||||
builder: (_) {
|
||||
// TODO: modify Format.<functions> to take optional Coin parameter so this type oif check isn't done in ui
|
||||
int value = _transaction.amount;
|
||||
if (coin == Coin.monero) {
|
||||
value = (value ~/ 10000);
|
||||
} else if (coin == Coin.wownero) {
|
||||
value = (value ~/ 1000);
|
||||
}
|
||||
if (ref.watch(prefsChangeNotifierProvider
|
||||
.select((value) => value.externalCalls)))
|
||||
const SizedBox(
|
||||
width: 10,
|
||||
),
|
||||
if (ref.watch(prefsChangeNotifierProvider
|
||||
.select((value) => value.externalCalls)))
|
||||
Flexible(
|
||||
child: FittedBox(
|
||||
fit: BoxFit.scaleDown,
|
||||
child: Builder(
|
||||
builder: (_) {
|
||||
// TODO: modify Format.<functions> to take optional Coin parameter so this type oif check isn't done in ui
|
||||
int value = _transaction.amount;
|
||||
if (coin == Coin.monero) {
|
||||
value = (value ~/ 10000);
|
||||
} else if (coin == Coin.wownero) {
|
||||
value = (value ~/ 1000);
|
||||
}
|
||||
|
||||
return Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
value: Format.satoshisToAmount(value) *
|
||||
price,
|
||||
locale: locale,
|
||||
decimalPlaces: 2,
|
||||
)} $baseCurrency",
|
||||
style: STextStyles.label(context),
|
||||
);
|
||||
},
|
||||
return Text(
|
||||
"${Format.localizedStringAsFixed(
|
||||
value: Format.satoshisToAmount(value) *
|
||||
price,
|
||||
locale: locale,
|
||||
decimalPlaces: 2,
|
||||
)} $baseCurrency",
|
||||
style: STextStyles.label(context),
|
||||
);
|
||||
},
|
||||
),
|
||||
),
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
],
|
||||
|
|
Loading…
Reference in a new issue