Skip to content

Commit

Permalink
TXS - receive amount without fees
Browse files Browse the repository at this point in the history
  • Loading branch information
mocodesmo committed Dec 26, 2024
1 parent 692f276 commit e77d376
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions lib/home/transactions.dart
Original file line number Diff line number Diff line change
Expand Up @@ -287,10 +287,13 @@ class HomeTxItem2 extends StatelessWidget {
// if (showOnlySwap) return _SwapTxHomeListItem(transaction: tx);

final label = tx.label ?? '';
final isReceive = tx.isReceived();

final amount = context.select(
(CurrencyCubit x) => x.state
.getAmountInUnits(tx.getNetAmountIncludingFees(), removeText: true),
(CurrencyCubit x) => x.state.getAmountInUnits(
isReceive ? tx.getNetAmountToPayee() : tx.getNetAmountIncludingFees(),
removeText: true,
),
);

final units = context.select(
Expand Down Expand Up @@ -335,8 +338,6 @@ class HomeTxItem2 extends StatelessWidget {
: statusImg;
}

final isReceive = tx.isReceived();

final amt = '${isReceive ? '' : ''}${amount.replaceAll("-", "")}';

// final wallet = tx.wallet!;
Expand Down
2 changes: 1 addition & 1 deletion lib/wallet/wallet_txs.dart
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ class HomeTxItem extends StatelessWidget {

var amount = context.select(
(CurrencyCubit x) => x.state.getAmountInUnits(
tx.getNetAmountIncludingFees(),
isReceive ? tx.getNetAmountToPayee() : tx.getNetAmountIncludingFees(),
isLiquid: tx.isLiquid,
),
);
Expand Down

0 comments on commit e77d376

Please sign in to comment.