|
1 | 1 | import 'dart:async'; |
2 | 2 | import 'dart:convert'; |
3 | | -import 'dart:io'; |
4 | 3 | import 'dart:isolate'; |
5 | 4 |
|
6 | 5 | import 'package:bitcoin_base/bitcoin_base.dart'; |
@@ -38,7 +37,6 @@ import 'package:cw_core/get_height_by_date.dart'; |
38 | 37 | import 'package:cw_core/hardware/hardware_wallet_service.dart'; |
39 | 38 | import 'package:cw_core/node.dart'; |
40 | 39 | import 'package:cw_core/output_info.dart'; |
41 | | -import 'package:cw_core/pathForWallet.dart'; |
42 | 40 | import 'package:cw_core/pending_transaction.dart'; |
43 | 41 | import 'package:cw_core/root_dir.dart'; |
44 | 42 | import 'package:cw_core/sync_status.dart'; |
@@ -1539,6 +1537,7 @@ abstract class ElectrumWalletBase |
1539 | 1537 | fee: estimatedTx.fee.amount, |
1540 | 1538 | network: network, |
1541 | 1539 | memo: estimatedTx.memo, |
| 1540 | + inputOrdering: BitcoinOrdering.shuffle, |
1542 | 1541 | outputOrdering: BitcoinOrdering.none, |
1543 | 1542 | enableRBF: !estimatedTx.spendsUnconfirmedTX, |
1544 | 1543 | ); |
@@ -1736,37 +1735,6 @@ abstract class ElectrumWalletBase |
1736 | 1735 | await transactionHistory.save(); |
1737 | 1736 | } |
1738 | 1737 |
|
1739 | | - @override |
1740 | | - Future<void> renameWalletFiles(String newWalletName) async { |
1741 | | - final currentWalletPath = await pathForWallet(name: walletInfo.name, type: type); |
1742 | | - final currentWalletFile = File(currentWalletPath); |
1743 | | - |
1744 | | - final currentDirPath = await pathForWalletDir(name: walletInfo.name, type: type); |
1745 | | - final currentTransactionsFile = File('$currentDirPath/$transactionsHistoryFileName'); |
1746 | | - |
1747 | | - // Copies current wallet files into new wallet name's dir and files |
1748 | | - if (currentWalletFile.existsSync()) { |
1749 | | - final newWalletPath = await pathForWallet(name: newWalletName, type: type); |
1750 | | - await currentWalletFile.copy(newWalletPath); |
1751 | | - } |
1752 | | - if (currentTransactionsFile.existsSync()) { |
1753 | | - final newDirPath = await pathForWalletDir(name: newWalletName, type: type); |
1754 | | - await currentTransactionsFile.copy('$newDirPath/$transactionsHistoryFileName'); |
1755 | | - } |
1756 | | - |
1757 | | - // Delete old name's dir and files |
1758 | | - final dir = Directory(currentDirPath); |
1759 | | - for (var attempt = 0; attempt < 3; attempt++) { |
1760 | | - try { |
1761 | | - await dir.delete(recursive: true); |
1762 | | - break; |
1763 | | - } on FileSystemException { |
1764 | | - if (attempt == 2) rethrow; |
1765 | | - await Future<void>.delayed(const Duration(milliseconds: 200)); |
1766 | | - } |
1767 | | - } |
1768 | | - } |
1769 | | - |
1770 | 1738 | @override |
1771 | 1739 | Future<void> changePassword(String password) async { |
1772 | 1740 | _password = password; |
@@ -2335,6 +2303,7 @@ abstract class ElectrumWalletBase |
2335 | 2303 | fee: BigInt.from(newFee), |
2336 | 2304 | network: network, |
2337 | 2305 | memo: memo, |
| 2306 | + inputOrdering: BitcoinOrdering.shuffle, |
2338 | 2307 | outputOrdering: BitcoinOrdering.none, |
2339 | 2308 | enableRBF: true, |
2340 | 2309 | ); |
|
0 commit comments