Filter out spam transactions for Polygon (#2543)

* fix: Polygon transactions not coming up in transactions history page

* fix: Filter out polygon spam transactions
This commit is contained in:
David Adegoke
2025-09-26 11:16:57 +03:00
committed by GitHub
parent 09127e5e57
commit 2f3ec951e0
2 changed files with 30 additions and 23 deletions
@@ -90,6 +90,8 @@ class TransactionsPage extends StatelessWidget {
return Container();
}
if (item.transaction.amount == 0.0) return Container();
final transaction = item.transaction;
final transactionType =
dashboardViewModel.getTransactionType(transaction);
@@ -193,30 +195,31 @@ class TransactionsPage extends StatelessWidget {
final order = item.order;
return Observer(
builder: (_) {
// TODO: Refactor Amount Hiding Logic it is not working properly for Orders and Trades
final hide = dashboardViewModel.balanceViewModel.displayMode ==
BalanceDisplayMode.hiddenBalance;
final hide = dashboardViewModel.balanceViewModel.displayMode ==
BalanceDisplayMode.hiddenBalance;
final formattedAmount = hide ? '---' : order.amountFormatted();
final formattedReceiveAmount = hide ? '---' : order.receiveAmount;
final formattedAmount = hide ? '---' : order.amountFormatted();
final formattedReceiveAmount = hide ? '---' : order.receiveAmount;
return OrderRow(
key: item.key,
onTap: () => Navigator.of(context)
.pushNamed(Routes.orderDetails, arguments: order),
providerTitle: order.providerTitle,
providerIconPath: order.providerIcon,
from: order.from ?? '',
to: order.to ?? '',
createdAtFormattedDate: DateFormat('HH:mm').format(order.createdAt),
formattedAmount: formattedAmount,
formattedReceiveAmount: dashboardViewModel.balanceViewModel.isFiatDisabled &&
order.source == OrderSourceDescription.order
? ''
: formattedReceiveAmount,
);
}
return OrderRow(
key: item.key,
onTap: () => Navigator.of(context)
.pushNamed(Routes.orderDetails, arguments: order),
providerTitle: order.providerTitle,
providerIconPath: order.providerIcon,
from: order.from ?? '',
to: order.to ?? '',
createdAtFormattedDate:
DateFormat('HH:mm').format(order.createdAt),
formattedAmount: formattedAmount,
formattedReceiveAmount:
dashboardViewModel.balanceViewModel.isFiatDisabled &&
order.source == OrderSourceDescription.order
? ''
: formattedReceiveAmount,
);
},
);
}
return Container(color: Colors.transparent, height: 1);