From 485b4a137919647683f9da001fb851b8d082dcf2 Mon Sep 17 00:00:00 2001
From: sneurlax <sneurlax@gmail.com>
Date: Thu, 28 Sep 2023 11:20:09 -0500
Subject: [PATCH] pass chainHeight, remove getChainHeight stub

typofix
---
 .../coins/bitcoincash/bitcoincash_wallet.dart   |  1 +
 .../mixins/fusion_wallet_interface.dart         | 17 +----------------
 2 files changed, 2 insertions(+), 16 deletions(-)

diff --git a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart
index 70b04c6b5..31e5353d6 100644
--- a/lib/services/coins/bitcoincash/bitcoincash_wallet.dart
+++ b/lib/services/coins/bitcoincash/bitcoincash_wallet.dart
@@ -145,6 +145,7 @@ class BitcoinCashWallet extends CoinServiceAPI
         return await _currentChangeAddress;
       },
       getTxCountForAddress: getTxCount,
+      getChainHeight: () async => chainHeight,
     );
     initCoinControlInterface(
       walletId: walletId,
diff --git a/lib/services/mixins/fusion_wallet_interface.dart b/lib/services/mixins/fusion_wallet_interface.dart
index 436755ca1..f1ae8d4d3 100644
--- a/lib/services/mixins/fusion_wallet_interface.dart
+++ b/lib/services/mixins/fusion_wallet_interface.dart
@@ -200,21 +200,6 @@ mixin FusionWalletInterface {
     }
   }
 
-  /// Returns the current chain height.
-  ///
-  /// This function is used by FusionDart to determine if a transaction is
-  /// confirmed or not.
-  ///
-  /// Returns:
-  ///   A `Future<int>` that resolves to the current chain height.
-  ///
-  /// Throws:
-  ///   An `Exception` if the chain height cannot be determined.
-  Future<int> getChainHeight() async {
-    throw UnimplementedError(
-        "TODO getChainHeight eg look up chain height from electrumx");
-  }
-
   // Initial attempt for CashFusion integration goes here.
 
   /// Fuse the wallet's UTXOs.
@@ -235,7 +220,7 @@ mixin FusionWalletInterface {
       /*createNewReservedChangeAddress: createNewReservedChangeAddress,*/
       getUnusedReservedChangeAddresses: getUnusedReservedChangeAddresses,
       getSocksProxyAddress: getSocksProxyAddress,
-      getChainHeight: getChainHeight,
+      getChainHeight: _getChainHeight,
     );
 
     // Add stack UTXOs.