diff --git a/fusiondart b/fusiondart index ad107a683..c021a3e8f 160000 --- a/fusiondart +++ b/fusiondart @@ -1 +1 @@ -Subproject commit ad107a683cfdf72040270921062fc6f43ae63f6b +Subproject commit c021a3e8fb815850de6ef655da360acfde34acf2 diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart index e0e6b095c..cf2fcf91f 100644 --- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart +++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart @@ -139,7 +139,8 @@ class BitcoinCashWallet extends CoinServiceAPI walletId: walletId, coin: coin, db: db, - getCurrentChangeAddress: () => currentChangeAddress); + getCurrentChangeAddress: () => currentChangeAddress, + getNextChangeAddress: () => nextChangeAddress); initCoinControlInterface( walletId: walletId, walletName: walletName, diff --git a/lib/services/mixins/fusion_interface.dart b/lib/services/mixins/fusion_interface.dart index dcab0096e..8579d3a11 100644 --- a/lib/services/mixins/fusion_interface.dart +++ b/lib/services/mixins/fusion_interface.dart @@ -17,17 +17,20 @@ mixin FusionInterface { // passed in wallet functions late final Future Function() _getCurrentChangeAddress; + late final Future Function() _getNextChangeAddress; void initFusionInterface({ required String walletId, required Coin coin, required MainDB db, required Future Function() getCurrentChangeAddress, + required Future Function() getNextChangeAddress, }) { _walletId = walletId; _coin = coin; _db = db; _getCurrentChangeAddress = getCurrentChangeAddress; + _getNextChangeAddress = getNextChangeAddress; } static List
reserve_change_addresses(int number_addresses) { @@ -44,7 +47,8 @@ mixin FusionInterface { void fuse() async { // Initial attempt for CashFusion integration goes here. - Fusion mainFusionObject = Fusion(); + Fusion mainFusionObject = + Fusion(generateChangeAddress: () => _getNextChangeAddress()); // add stack utxos List utxos = await _db.getUTXOs(_walletId).findAll();