mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-04 12:34:14 +01:00
CAKE-345 | applied batch sending to monero wallet
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
import 'package:cake_wallet/bitcoin/bitcoin_amount_format.dart';
|
||||
import 'package:cake_wallet/bitcoin/electrum_wallet.dart';
|
||||
import 'package:cake_wallet/entities/calculate_fiat_amount_raw.dart';
|
||||
import 'package:cake_wallet/entities/openalias_record.dart';
|
||||
import 'package:cake_wallet/entities/parse_address_from_domain.dart';
|
||||
import 'package:cake_wallet/entities/parsed_address.dart';
|
||||
import 'package:cake_wallet/monero/monero_amount_format.dart';
|
||||
|
||||
@@ -199,18 +199,11 @@ abstract class SendViewModelBase with Store {
|
||||
return BitcoinTransactionCredentials(
|
||||
sendItemList, priority as BitcoinTransactionPriority);
|
||||
case WalletType.monero:
|
||||
final _item = sendItemList.first;
|
||||
final address = _item.address;
|
||||
final amount = _item.sendAll
|
||||
? null
|
||||
: _item.cryptoAmount.replaceAll(',', '.');
|
||||
final priority = _settingsStore.priority[_wallet.type];
|
||||
|
||||
return MoneroTransactionCreationCredentials(
|
||||
address: address,
|
||||
paymentId: '',
|
||||
priority: priority as MoneroTransactionPriority,
|
||||
amount: amount);
|
||||
sendItemList: sendItemList,
|
||||
priority: priority as MoneroTransactionPriority);
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -30,6 +30,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
this.settingsStore})
|
||||
: items = [] {
|
||||
showRecipientAddress = settingsStore?.shouldSaveRecipientAddress ?? false;
|
||||
isRecipientAddressShown = false;
|
||||
|
||||
final dateFormat = DateFormatter.withCurrentLocal();
|
||||
final tx = transactionInfo;
|
||||
@@ -64,6 +65,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
final address =
|
||||
_wallet.getTransactionAddress(accountIndex, addressIndex);
|
||||
if (address?.isNotEmpty ?? false) {
|
||||
isRecipientAddressShown = true;
|
||||
_items.add(
|
||||
StandartListItem(
|
||||
title: S.current.transaction_details_recipient_address,
|
||||
@@ -101,7 +103,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
items.addAll(_items);
|
||||
}
|
||||
|
||||
if (showRecipientAddress) {
|
||||
if (showRecipientAddress && !isRecipientAddressShown) {
|
||||
final recipientAddress = transactionDescriptionBox.values
|
||||
.firstWhere((val) => val.id == transactionInfo.id, orElse: () => null)
|
||||
?.recipientAddress;
|
||||
@@ -151,6 +153,7 @@ abstract class TransactionDetailsViewModelBase with Store {
|
||||
|
||||
final List<TransactionDetailsListItem> items;
|
||||
bool showRecipientAddress;
|
||||
bool isRecipientAddressShown;
|
||||
|
||||
String _explorerUrl(WalletType type, String txId) {
|
||||
switch (type) {
|
||||
|
||||
Reference in New Issue
Block a user