mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-05-03 03:12:18 +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
lib
|
@ -255,17 +255,19 @@ class _TransactionDetailsViewState
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 2,
|
height: 2,
|
||||||
),
|
),
|
||||||
SelectableText(
|
if (ref.watch(prefsChangeNotifierProvider
|
||||||
"${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(
|
.select((value) => value.externalCalls)))
|
||||||
localeServiceChangeNotifierProvider
|
SelectableText(
|
||||||
.select((value) => value.locale),
|
"${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(
|
||||||
), decimalPlaces: 2)} ${ref.watch(
|
localeServiceChangeNotifierProvider
|
||||||
prefsChangeNotifierProvider.select(
|
.select((value) => value.locale),
|
||||||
(value) => value.currency,
|
), decimalPlaces: 2)} ${ref.watch(
|
||||||
),
|
prefsChangeNotifierProvider.select(
|
||||||
)}",
|
(value) => value.currency,
|
||||||
style: STextStyles.itemSubtitle(context),
|
),
|
||||||
),
|
)}",
|
||||||
|
style: STextStyles.itemSubtitle(context),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
TxIcon(
|
TxIcon(
|
||||||
|
|
|
@ -202,35 +202,39 @@ class _TransactionCardState extends ConsumerState<TransactionCard> {
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
const SizedBox(
|
if (ref.watch(prefsChangeNotifierProvider
|
||||||
width: 10,
|
.select((value) => value.externalCalls)))
|
||||||
),
|
const SizedBox(
|
||||||
Flexible(
|
width: 10,
|
||||||
child: FittedBox(
|
),
|
||||||
fit: BoxFit.scaleDown,
|
if (ref.watch(prefsChangeNotifierProvider
|
||||||
child: Builder(
|
.select((value) => value.externalCalls)))
|
||||||
builder: (_) {
|
Flexible(
|
||||||
// TODO: modify Format.<functions> to take optional Coin parameter so this type oif check isn't done in ui
|
child: FittedBox(
|
||||||
int value = _transaction.amount;
|
fit: BoxFit.scaleDown,
|
||||||
if (coin == Coin.monero) {
|
child: Builder(
|
||||||
value = (value ~/ 10000);
|
builder: (_) {
|
||||||
} else if (coin == Coin.wownero) {
|
// TODO: modify Format.<functions> to take optional Coin parameter so this type oif check isn't done in ui
|
||||||
value = (value ~/ 1000);
|
int value = _transaction.amount;
|
||||||
}
|
if (coin == Coin.monero) {
|
||||||
|
value = (value ~/ 10000);
|
||||||
|
} else if (coin == Coin.wownero) {
|
||||||
|
value = (value ~/ 1000);
|
||||||
|
}
|
||||||
|
|
||||||
return Text(
|
return Text(
|
||||||
"${Format.localizedStringAsFixed(
|
"${Format.localizedStringAsFixed(
|
||||||
value: Format.satoshisToAmount(value) *
|
value: Format.satoshisToAmount(value) *
|
||||||
price,
|
price,
|
||||||
locale: locale,
|
locale: locale,
|
||||||
decimalPlaces: 2,
|
decimalPlaces: 2,
|
||||||
)} $baseCurrency",
|
)} $baseCurrency",
|
||||||
style: STextStyles.label(context),
|
style: STextStyles.label(context),
|
||||||
);
|
);
|
||||||
},
|
},
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
],
|
],
|
||||||
|
|
Loading…
Reference in a new issue