zec ironwood (#3425)

* initial

* wip

* ironwood detection, migration

* dev: zec address validation on rt

* fix: ironwood spend

* ironwood regressions

* fix: tx history

* bump: zkool2

* fix: tx amounts on pending
fix: ironwood pending balance
fix: orchard->ironwood migration
fix: orchard->any pre ironwood txs
fix: ironwood -> any txs
fix: WrongSpendAuthorizingKey
fix: tx history
fix: autoshield to ironwood
fix: zkool to latest version
break: my sleep schedule :sweating: :worksonmymachine:

* thx fable

* downgrade frb to 2.11.1

* fix: tx amounts in history

* Migating... / migration label for O->I txs
This commit is contained in:
cyan
2026-07-27 10:20:40 +02:00
committed by GitHub
parent b73c46ac59
commit 92c2c5e043
38 changed files with 1064 additions and 203 deletions
@@ -538,10 +538,16 @@ abstract class DashboardViewModelBase with Store {
.map((item) => _txIdentityString(item.transaction.txHash, item.transaction.direction))
.toSet();
transactions.removeWhere(
(item) => newKeys
.contains(_txIdentityString(item.transaction.txHash, item.transaction.direction)),
);
transactions.removeWhere((item) {
if (wallet.type == WalletType.zcash) {
return newTransactions.any(
(n) => n.transaction.txHash == item.transaction.txHash,
);
}
return newKeys.contains(
_txIdentityString(item.transaction.txHash, item.transaction.direction),
);
});
transactions.addAll(newTransactions);
// transactions.clear();
@@ -3,6 +3,7 @@ import 'package:cake_wallet/zcash/zcash.dart';
import 'package:cw_core/receive_page_option.dart';
import 'package:cw_core/wallet_base.dart';
import 'package:cw_core/wallet_type.dart';
import 'package:cw_zcash/cw_zcash.dart';
import 'package:mobx/mobx.dart';
part 'receive_option_view_model.g.dart';
@@ -18,7 +19,14 @@ abstract class ReceiveOptionViewModelBase with Store {
? ReceivePageOption.testnet
: _wallet.type == WalletType.zcash
? zcash!.getSelectedAddressType(_wallet)
: ReceivePageOption.mainnet);
: ReceivePageOption.mainnet) {
if (_wallet.type == WalletType.zcash) {
reaction<bool>(
(_) => (_wallet.walletAddresses as ZcashWalletAddresses).ironwoodActive,
(_) => _syncZcashShieldedLabel(),
);
}
}
final WalletBase _wallet;
@@ -27,10 +35,21 @@ abstract class ReceiveOptionViewModelBase with Store {
@observable
ReceivePageOption selectedReceiveOption;
@computed
List<ReceivePageOption> get options => _wallet.walletAddresses.receivePageOptions;
String get walletTypeString => walletTypeToString(_wallet.type);
@action
void selectReceiveOption(ReceivePageOption option) => selectedReceiveOption = option;
@action
void _syncZcashShieldedLabel() {
for (final option in options) {
if (option.value == selectedReceiveOption.value) {
selectedReceiveOption = option;
return;
}
}
}
}
@@ -60,6 +60,9 @@ class TransactionListItem extends ActionListItem with Keyable {
return 'Transaction has missing data';
}
if (transaction.additionalInfo['isIronwoodMigration'] == true) {
return 'Migration';
}
if (transaction.additionalInfo['isAutoShield'] == true) {
if (transaction.isPending) {
final status = formattedStatus;