mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-10-23 06:38:35 +02:00
User token swap improvements (#2470)
* Handle null currency in trade * Improve trade network handling and error reporting * update Polygon network tag * Update exchange_trade_view_model.dart * handle nullable network fields * Update lib/exchange/provider/letsexchange_exchange_provider.dart --------- Co-authored-by: Omar Hatem <omarh.ismail1@gmail.com>
This commit is contained in:
@@ -385,18 +385,20 @@ class TransactionsPageRobot {
|
||||
|
||||
Future<void> _verifyTradeListItemDisplay(TradeListItem item) async {
|
||||
final keyId = 'trade_list_item_${item.trade.id}_key';
|
||||
final from = item.trade.from?.toString() ?? item.trade.userCurrencyFrom.toString();
|
||||
final to = item.trade.to?.toString() ?? item.trade.userCurrencyTo.toString();
|
||||
|
||||
//* ==============Confirm it has the right key for this item ========
|
||||
commonTestCases.hasValueKey(keyId);
|
||||
|
||||
//* ==============Confirm it displays the correct provider =========================
|
||||
final conversionFlow = '${item.trade.from.toString()} → ${item.trade.to.toString()}';
|
||||
final conversionFlow = '$from → $to';
|
||||
|
||||
commonTestCases.hasText(conversionFlow);
|
||||
|
||||
//* ===========Confirm it displays the properly formatted amount with its crypto tag ========
|
||||
|
||||
final amountCryptoText = item.tradeFormattedAmount + ' ' + item.trade.from.toString();
|
||||
final amountCryptoText = item.tradeFormattedAmount + ' ' + from;
|
||||
|
||||
commonTestCases.hasText(amountCryptoText);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user