diff --git a/cw_core/lib/transaction_info.dart b/cw_core/lib/transaction_info.dart index b8e4a5e0c..38b4b799d 100644 --- a/cw_core/lib/transaction_info.dart +++ b/cw_core/lib/transaction_info.dart @@ -14,6 +14,7 @@ abstract class TransactionInfo extends Object with Keyable { String fiatAmount(); String? feeFormatted(); void changeFiatAmount(String amount); + String? to; @override dynamic get keyIndex => id; diff --git a/cw_ethereum/lib/ethereum_transaction_info.dart b/cw_ethereum/lib/ethereum_transaction_info.dart index efdc61407..a0649ba25 100644 --- a/cw_ethereum/lib/ethereum_transaction_info.dart +++ b/cw_ethereum/lib/ethereum_transaction_info.dart @@ -14,6 +14,7 @@ class EthereumTransactionInfo extends TransactionInfo { required this.isPending, required this.date, required this.confirmations, + required this.to, }) : this.amount = ethAmount.toInt(), this.fee = ethFee.toInt(); @@ -30,6 +31,7 @@ class EthereumTransactionInfo extends TransactionInfo { final int confirmations; final String tokenSymbol; String? _fiatAmount; + final String? to; @override String amountFormatted() => @@ -56,6 +58,7 @@ class EthereumTransactionInfo extends TransactionInfo { isPending: data['isPending'] as bool, confirmations: data['confirmations'] as int, tokenSymbol: data['tokenSymbol'] as String, + to: data['to'], ); } @@ -70,5 +73,6 @@ class EthereumTransactionInfo extends TransactionInfo { 'isPending': isPending, 'confirmations': confirmations, 'tokenSymbol': tokenSymbol, + 'to': to, }; } diff --git a/cw_ethereum/lib/ethereum_wallet.dart b/cw_ethereum/lib/ethereum_wallet.dart index 8d7c477e1..b5bbdb58a 100644 --- a/cw_ethereum/lib/ethereum_wallet.dart +++ b/cw_ethereum/lib/ethereum_wallet.dart @@ -283,6 +283,7 @@ abstract class EthereumWalletBase ethFee: BigInt.from(transactionModel.gasUsed) * transactionModel.gasPrice, exponent: transactionModel.tokenDecimal ?? 18, tokenSymbol: transactionModel.tokenSymbol ?? "ETH", + to: transactionModel.to, ); } diff --git a/lib/exchange/sideshift/sideshift_exchange_provider.dart b/lib/exchange/sideshift/sideshift_exchange_provider.dart index 257d339cf..84b4cd4e0 100644 --- a/lib/exchange/sideshift/sideshift_exchange_provider.dart +++ b/lib/exchange/sideshift/sideshift_exchange_provider.dart @@ -69,7 +69,7 @@ class SideShiftExchangeProvider extends ExchangeProvider { final depositNetwork = _networkFor(from); final settleNetwork = _networkFor(to); - final url = "$apiBaseUrl$rangePath/$fromCurrency-$depositNetwork/$toCurrency-$settleNetwork"; + final url = "$apiBaseUrl$rangePath/$fromCurrency-$depositNetwork/$toCurrency-$settleNetwork?amount=$amount"; final uri = Uri.parse(url); final response = await get(uri); diff --git a/lib/view_model/transaction_details_view_model.dart b/lib/view_model/transaction_details_view_model.dart index bb6008754..1620870b4 100644 --- a/lib/view_model/transaction_details_view_model.dart +++ b/lib/view_model/transaction_details_view_model.dart @@ -215,6 +215,8 @@ abstract class TransactionDetailsViewModelBase with Store { StandartListItem(title: S.current.transaction_details_amount, value: tx.amountFormatted()), if (tx.feeFormatted()?.isNotEmpty ?? false) StandartListItem(title: S.current.transaction_details_fee, value: tx.feeFormatted()!), + if (showRecipientAddress && tx.to != null) + StandartListItem(title: S.current.transaction_details_recipient_address, value: tx.to!), ]; items.addAll(_items);