File tree Expand file tree Collapse file tree 2 files changed +6
-5
lines changed
Expand file tree Collapse file tree 2 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -339,7 +339,7 @@ class FiroWallet<T extends ElectrumXCurrencyInterface> extends Bip39HDWallet<T>
339339 output = output.copyWith (walletOwns: true );
340340 } else if (isSparkMint && isMySpark) {
341341 wasReceivedInThisWallet = true ;
342- if (output.addresses.contains (sparkChangeAddress.value )) {
342+ if (output.addresses.contains (sparkChangeAddress)) {
343343 changeAmountReceivedInThisWallet += output.value;
344344 } else {
345345 amountReceivedInThisWallet += output.value;
Original file line number Diff line number Diff line change @@ -112,8 +112,9 @@ mixin SparkInterface<T extends ElectrumXCurrencyInterface>
112112 String ? _viewKeyHex;
113113 String ? get sparkViewKey => _viewKeyHex! ;
114114
115- // Really we should just send change back to the same address.
116- late Address sparkChangeAddress;
115+ Address ? _sparkChangeAddress;
116+
117+ String ? get sparkChangeAddress => _sparkChangeAddress? .value;
117118
118119 bool get isTestNet {
119120 return cryptoCurrency.network.isTestNet;
@@ -331,7 +332,7 @@ mixin SparkInterface<T extends ElectrumXCurrencyInterface>
331332 }
332333
333334 _currentSparkAddress = address;
334- sparkChangeAddress = await _generateSparkAddress (libSpark.sparkChange);
335+ _sparkChangeAddress = await _generateSparkAddress (libSpark.sparkChange);
335336 } catch (e, s) {
336337 // do nothing, still allow user into wallet
337338 Logging .instance.e ("$runtimeType init() failed" , error: e, stackTrace: s);
@@ -654,7 +655,7 @@ mixin SparkInterface<T extends ElectrumXCurrencyInterface>
654655 ),
655656 memo: txData.sparkRecipients! [i].memo,
656657 isChange:
657- sparkChangeAddress .value == txData.sparkRecipients! [i].address,
658+ _sparkChangeAddress ! .value == txData.sparkRecipients! [i].address,
658659 ));
659660 }
660661
You can’t perform that action at this time.
0 commit comments