updated mocks

This commit is contained in:
julian 2023-04-26 17:11:54 -06:00
parent cce4336f43
commit 47e1bfbe5a
6 changed files with 774 additions and 1230 deletions

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i23;
import 'dart:typed_data' as _i30;
import 'dart:ui' as _i25;
import 'package:bip32/bip32.dart' as _i18;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip47/bip47.dart' as _i19;
import 'package:bitcoindart/bitcoindart.dart' as _i14;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i13;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i11;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i10;
import 'package:stackwallet/models/balance.dart' as _i12;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i18;
import 'package:stackwallet/models/node_model.dart' as _i26;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i9;
import 'package:stackwallet/models/signing_data.dart' as _i29;
@ -209,8 +209,8 @@ class _FakeTuple2_14<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -219,8 +219,8 @@ class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
);
}
class _FakeBIP32_16 extends _i1.SmartFake implements _i18.BIP32 {
_FakeBIP32_16(
class _FakeAddress_16 extends _i1.SmartFake implements _i18.Address {
_FakeAddress_16(
Object parent,
Invocation parentInvocation,
) : super(
@ -987,16 +987,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValue: _i22.Coin.bitcoin,
) as _i22.Coin);
@override
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i18.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
returnValue: _i23.Future<List<_i18.UTXO>>.value(<_i18.UTXO>[]),
) as _i23.Future<List<_i18.UTXO>>);
@override
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i18.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
_i23.Future<List<_i18.Transaction>>.value(<_i18.Transaction>[]),
) as _i23.Future<List<_i18.Transaction>>);
@override
_i23.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -1406,7 +1406,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i17.UTXO>? utxos,
List<_i18.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -1423,7 +1423,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
));
@override
_i23.Future<List<_i29.SigningData>> fetchBuildTxData(
List<_i17.UTXO>? utxosToUse) =>
List<_i18.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1677,10 +1677,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
_i23.Future<_i16.Tuple2<_i18.Transaction, _i18.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i17.Address>? myAddresses,
List<_i18.Address>? myAddresses,
_i22.Coin? coin,
int? minConfirms,
String? walletId,
@ -1698,8 +1698,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
],
),
returnValue:
_i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_14<_i17.Transaction, _i17.Address>(
_i23.Future<_i16.Tuple2<_i18.Transaction, _i18.Address>>.value(
_FakeTuple2_14<_i18.Transaction, _i18.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1713,7 +1713,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
],
),
)),
) as _i23.Future<_i16.Tuple2<_i17.Transaction, _i17.Address>>);
) as _i23.Future<_i16.Tuple2<_i18.Transaction, _i18.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1723,6 +1723,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
required _i13.MainDB? db,
required _i10.ElectrumX? electrumXClient,
required _i7.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i23.Future<String?> Function()? getMnemonicString,
@ -1741,7 +1742,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
})?
prepareSend,
required _i23.Future<int> Function({required String address})? getTxCount,
required _i23.Future<List<_i29.SigningData>> Function(List<_i17.UTXO>)?
required _i23.Future<List<_i29.SigningData>> Function(List<_i18.UTXO>)?
fetchBuildTxData,
required _i23.Future<void> Function()? refresh,
required _i23.Future<void> Function()? checkChangeAddressForTransactions,
@ -1758,6 +1759,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1776,28 +1778,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i17.Address> currentReceivingPaynymAddress(
_i19.PaymentCode? sender) =>
_i23.Future<_i17.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i23.Future<_i17.BIP32>);
@override
_i23.Future<_i30.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i23.Future<_i30.Uint8List>.value(_i30.Uint8List(0)),
) as _i23.Future<_i30.Uint8List>);
@override
_i23.Future<_i18.Address> currentReceivingPaynymAddress({
required _i19.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
returnValue: _i23.Future<_i18.Address>.value(_FakeAddress_16(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i23.Future<_i17.Address>);
) as _i23.Future<_i18.Address>);
@override
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i19.PaymentCode? sender) =>
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i19.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
@ -1813,81 +1861,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i18.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i23.Future<_i17.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i23.Future<_i18.BIP32>.value(_FakeBIP32_16(
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i23.Future<_i18.BIP32>);
) as _i23.Future<_i17.BIP32>);
@override
_i23.Future<_i18.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i23.Future<_i18.BIP32>.value(_FakeBIP32_16(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i23.Future<_i18.BIP32>);
@override
_i23.Future<_i19.PaymentCode> getPaymentCode(
_i28.DerivePathType? derivePathType, [
_i18.BIP32? bip32Root,
]) =>
_i23.Future<_i19.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i23.Future<_i19.PaymentCode>.value(_FakePaymentCode_17(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i23.Future<_i19.PaymentCode>);
@ -1912,6 +1912,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
@override
_i23.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i19.PaymentCode? paymentCode,
required bool? isSegwit,
required _i15.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1921,6 +1922,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1929,9 +1931,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
_i23.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i23.Future<Map<String, dynamic>>);
@override
_i23.Future<_i17.Address> nextUnusedSendAddressFrom({
_i23.Future<_i18.Address> nextUnusedSendAddressFrom({
required _i19.PaymentCode? pCode,
required _i18.BIP32? privateKeyNode,
required bool? isSegwit,
required _i17.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1940,29 +1943,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
returnValue: _i23.Future<_i18.Address>.value(_FakeAddress_16(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i23.Future<_i17.Address>);
) as _i23.Future<_i18.Address>);
@override
_i23.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i17.UTXO>? utxos,
List<_i18.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1999,34 +2004,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValue: _i23.Future<bool>.value(false),
) as _i23.Future<bool>);
@override
_i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i17.Transaction? transaction,
required _i17.Address? myNotificationAddress,
}) =>
_i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i18.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i19.PaymentCode?>.value(),
) as _i23.Future<_i19.PaymentCode?>);
@override
_i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i17.Transaction? transaction,
required _i17.Address? myNotificationAddress,
}) =>
_i23.Future<_i19.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i18.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i19.PaymentCode?>.value(),
) as _i23.Future<_i19.PaymentCode?>);
@ -2071,111 +2066,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i27.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<void> restoreHistoryWith(
_i19.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i23.Future<void> restoreHistoryWith({
required _i19.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i17.Address> generatePaynymSendAddressFromKeyPair({
required _i14.ECPair? pair,
required int? derivationIndex,
required _i28.DerivePathType? derivePathType,
required _i19.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i23.Future<_i17.Address>);
@override
_i23.Future<_i17.Address> generatePaynymReceivingAddressFromKeyPair({
required _i14.ECPair? pair,
required int? derivationIndex,
required _i28.DerivePathType? derivePathType,
required _i19.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i23.Future<_i17.Address>);
@override
_i23.Future<_i17.Address> getMyNotificationAddress(
_i28.DerivePathType? derivePathType, [
_i18.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i23.Future<_i18.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
returnValue: _i23.Future<_i18.Address>.value(_FakeAddress_16(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i23.Future<_i17.Address>);
) as _i23.Future<_i18.Address>);
@override
_i23.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(
@ -2812,16 +2736,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
),
) as _i12.Balance);
@override
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i18.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
_i23.Future<List<_i18.Transaction>>.value(<_i18.Transaction>[]),
) as _i23.Future<List<_i18.Transaction>>);
@override
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i18.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
returnValue: _i23.Future<List<_i18.UTXO>>.value(<_i18.UTXO>[]),
) as _i23.Future<List<_i18.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -3180,16 +3104,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i20.CoinServiceAPI {
),
) as _i12.Balance);
@override
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i18.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
_i23.Future<List<_i18.Transaction>>.value(<_i18.Transaction>[]),
) as _i23.Future<List<_i18.Transaction>>);
@override
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i18.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
returnValue: _i23.Future<List<_i18.UTXO>>.value(<_i18.UTXO>[]),
) as _i23.Future<List<_i18.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i23;
import 'dart:typed_data' as _i29;
import 'dart:ui' as _i25;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip32/bip32.dart' as _i16;
import 'package:bip47/bip47.dart' as _i18;
import 'package:bitcoindart/bitcoindart.dart' as _i13;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9;
import 'package:stackwallet/models/balance.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/node_model.dart' as _i31;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8;
import 'package:stackwallet/models/signing_data.dart' as _i28;
@ -194,8 +194,8 @@ class _FakeTuple2_13<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
_FakeAddress_14(
class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 {
_FakeBIP32_14(
Object parent,
Invocation parentInvocation,
) : super(
@ -204,8 +204,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
);
}
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -779,16 +779,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i22.Coin.bitcoin,
) as _i22.Coin);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -1197,7 +1197,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -1214,7 +1214,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
));
@override
_i23.Future<List<_i28.SigningData>> fetchBuildTxData(
List<_i16.UTXO>? utxosToUse) =>
List<_i17.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1468,10 +1468,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i16.Address>? myAddresses,
List<_i17.Address>? myAddresses,
_i22.Coin? coin,
int? minConfirms,
String? walletId,
@ -1489,8 +1489,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
returnValue:
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value(
_FakeTuple2_13<_i16.Transaction, _i16.Address>(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_13<_i17.Transaction, _i17.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1504,7 +1504,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
)),
) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>);
) as _i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1514,6 +1514,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required _i12.MainDB? db,
required _i9.ElectrumX? electrumXClient,
required _i19.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i23.Future<String?> Function()? getMnemonicString,
@ -1532,7 +1533,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
})?
prepareSend,
required _i23.Future<int> Function({required String address})? getTxCount,
required _i23.Future<List<_i28.SigningData>> Function(List<_i16.UTXO>)?
required _i23.Future<List<_i28.SigningData>> Function(List<_i17.UTXO>)?
fetchBuildTxData,
required _i23.Future<void> Function()? refresh,
required _i23.Future<void> Function()? checkChangeAddressForTransactions,
@ -1549,6 +1550,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1567,28 +1569,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i16.Address> currentReceivingPaynymAddress(
_i18.PaymentCode? sender) =>
_i23.Future<_i16.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i29.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)),
) as _i23.Future<_i29.Uint8List>);
@override
_i23.Future<_i17.Address> currentReceivingPaynymAddress({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i18.PaymentCode? sender) =>
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
@ -1604,81 +1652,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i17.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i23.Future<_i16.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i23.Future<_i17.BIP32>);
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i23.Future<_i17.BIP32>);
@override
_i23.Future<_i18.PaymentCode> getPaymentCode(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
_i23.Future<_i18.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i23.Future<_i18.PaymentCode>);
@ -1703,6 +1703,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
@override
_i23.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i18.PaymentCode? paymentCode,
required bool? isSegwit,
required _i14.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1712,6 +1713,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1720,9 +1722,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
_i23.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i23.Future<Map<String, dynamic>>);
@override
_i23.Future<_i16.Address> nextUnusedSendAddressFrom({
_i23.Future<_i17.Address> nextUnusedSendAddressFrom({
required _i18.PaymentCode? pCode,
required _i17.BIP32? privateKeyNode,
required bool? isSegwit,
required _i16.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1731,29 +1734,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1790,34 +1795,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i23.Future<bool>.value(false),
) as _i23.Future<bool>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@ -1862,111 +1857,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<void> restoreHistoryWith(
_i18.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i23.Future<void> restoreHistoryWith({
required _i18.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> getMyNotificationAddress(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i23.Future<_i17.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(
@ -2386,16 +2310,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -2754,16 +2678,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i20.CoinServiceAPI {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i22;
import 'dart:typed_data' as _i29;
import 'dart:ui' as _i24;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip32/bip32.dart' as _i16;
import 'package:bip47/bip47.dart' as _i18;
import 'package:bitcoindart/bitcoindart.dart' as _i13;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9;
import 'package:stackwallet/models/balance.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8;
import 'package:stackwallet/models/signing_data.dart' as _i27;
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i25;
@ -192,8 +192,8 @@ class _FakeTuple2_13<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
_FakeAddress_14(
class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 {
_FakeBIP32_14(
Object parent,
Invocation parentInvocation,
) : super(
@ -202,8 +202,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
);
}
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -766,16 +766,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValue: _i21.Coin.bitcoin,
) as _i21.Coin);
@override
_i22.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i22.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i22.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i22.Future<List<_i16.UTXO>>);
returnValue: _i22.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i22.Future<List<_i17.UTXO>>);
@override
_i22.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i22.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i22.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i22.Future<List<_i16.Transaction>>);
_i22.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i22.Future<List<_i17.Transaction>>);
@override
_i22.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -1184,7 +1184,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -1201,7 +1201,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
));
@override
_i22.Future<List<_i27.SigningData>> fetchBuildTxData(
List<_i16.UTXO>? utxosToUse) =>
List<_i17.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1455,10 +1455,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction(
_i22.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i16.Address>? myAddresses,
List<_i17.Address>? myAddresses,
_i21.Coin? coin,
int? minConfirms,
String? walletId,
@ -1476,8 +1476,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
],
),
returnValue:
_i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value(
_FakeTuple2_13<_i16.Transaction, _i16.Address>(
_i22.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_13<_i17.Transaction, _i17.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1491,7 +1491,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
],
),
)),
) as _i22.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>);
) as _i22.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1501,6 +1501,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
required _i12.MainDB? db,
required _i9.ElectrumX? electrumXClient,
required _i28.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i22.Future<String?> Function()? getMnemonicString,
@ -1519,7 +1520,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
})?
prepareSend,
required _i22.Future<int> Function({required String address})? getTxCount,
required _i22.Future<List<_i27.SigningData>> Function(List<_i16.UTXO>)?
required _i22.Future<List<_i27.SigningData>> Function(List<_i17.UTXO>)?
fetchBuildTxData,
required _i22.Future<void> Function()? refresh,
required _i22.Future<void> Function()? checkChangeAddressForTransactions,
@ -1536,6 +1537,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1554,28 +1556,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i22.Future<_i16.Address> currentReceivingPaynymAddress(
_i18.PaymentCode? sender) =>
_i22.Future<_i16.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i22.Future<_i16.BIP32>);
@override
_i22.Future<_i29.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i22.Future<_i29.Uint8List>.value(_i29.Uint8List(0)),
) as _i22.Future<_i29.Uint8List>);
@override
_i22.Future<_i17.Address> currentReceivingPaynymAddress({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i22.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i22.Future<_i16.Address>);
) as _i22.Future<_i17.Address>);
@override
_i22.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i18.PaymentCode? sender) =>
_i22.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i22.Future<void>.value(),
returnValueForMissingStub: _i22.Future<void>.value(),
@ -1591,81 +1639,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValueForMissingStub: _i22.Future<void>.value(),
) as _i22.Future<void>);
@override
_i22.Future<_i17.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i22.Future<_i16.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15(
returnValue: _i22.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i22.Future<_i17.BIP32>);
) as _i22.Future<_i16.BIP32>);
@override
_i22.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i22.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i22.Future<_i17.BIP32>);
@override
_i22.Future<_i18.PaymentCode> getPaymentCode(
_i26.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
_i22.Future<_i18.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i22.Future<_i18.PaymentCode>.value(_FakePaymentCode_16(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i22.Future<_i18.PaymentCode>);
@ -1690,6 +1690,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
@override
_i22.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i18.PaymentCode? paymentCode,
required bool? isSegwit,
required _i14.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1699,6 +1700,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1707,9 +1709,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
_i22.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i22.Future<Map<String, dynamic>>);
@override
_i22.Future<_i16.Address> nextUnusedSendAddressFrom({
_i22.Future<_i17.Address> nextUnusedSendAddressFrom({
required _i18.PaymentCode? pCode,
required _i17.BIP32? privateKeyNode,
required bool? isSegwit,
required _i16.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1718,29 +1721,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i22.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i22.Future<_i16.Address>);
) as _i22.Future<_i17.Address>);
@override
_i22.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1777,34 +1782,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValue: _i22.Future<bool>.value(false),
) as _i22.Future<bool>);
@override
_i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i22.Future<_i18.PaymentCode?>.value(),
) as _i22.Future<_i18.PaymentCode?>);
@override
_i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i22.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i22.Future<_i18.PaymentCode?>.value(),
) as _i22.Future<_i18.PaymentCode?>);
@ -1849,111 +1844,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i25.BitcoinWallet {
returnValueForMissingStub: _i22.Future<void>.value(),
) as _i22.Future<void>);
@override
_i22.Future<void> restoreHistoryWith(
_i18.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i22.Future<void> restoreHistoryWith({
required _i18.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i22.Future<void>.value(),
returnValueForMissingStub: _i22.Future<void>.value(),
) as _i22.Future<void>);
@override
_i22.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i26.DerivePathType? derivePathType,
required _i18.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i22.Future<_i16.Address>);
@override
_i22.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i26.DerivePathType? derivePathType,
required _i18.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i22.Future<_i16.Address>);
@override
_i22.Future<_i16.Address> getMyNotificationAddress(
_i26.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i22.Future<_i17.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i22.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i22.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i22.Future<_i16.Address>);
) as _i22.Future<_i17.Address>);
@override
_i22.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(
@ -2111,16 +2035,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
),
) as _i11.Balance);
@override
_i22.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i22.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i22.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i22.Future<List<_i16.Transaction>>);
_i22.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i22.Future<List<_i17.Transaction>>);
@override
_i22.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i22.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i22.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i22.Future<List<_i16.UTXO>>);
returnValue: _i22.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i22.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -2479,16 +2403,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i19.CoinServiceAPI {
),
) as _i11.Balance);
@override
_i22.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i22.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i22.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i22.Future<List<_i16.Transaction>>);
_i22.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i22.Future<List<_i17.Transaction>>);
@override
_i22.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i22.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i22.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i22.Future<List<_i16.UTXO>>);
returnValue: _i22.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i22.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i21;
import 'dart:typed_data' as _i28;
import 'dart:ui' as _i23;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip32/bip32.dart' as _i16;
import 'package:bip47/bip47.dart' as _i18;
import 'package:bitcoindart/bitcoindart.dart' as _i13;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9;
import 'package:stackwallet/models/balance.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8;
import 'package:stackwallet/models/signing_data.dart' as _i26;
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as _i24;
@ -192,8 +192,8 @@ class _FakeTuple2_13<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
_FakeAddress_14(
class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 {
_FakeBIP32_14(
Object parent,
Invocation parentInvocation,
) : super(
@ -202,8 +202,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
);
}
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -521,16 +521,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValue: _i20.Coin.bitcoin,
) as _i20.Coin);
@override
_i21.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i21.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i21.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i21.Future<List<_i16.UTXO>>);
returnValue: _i21.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i21.Future<List<_i17.UTXO>>);
@override
_i21.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i21.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i21.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i21.Future<List<_i16.Transaction>>);
_i21.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i21.Future<List<_i17.Transaction>>);
@override
_i21.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -939,7 +939,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -956,7 +956,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
));
@override
_i21.Future<List<_i26.SigningData>> fetchBuildTxData(
List<_i16.UTXO>? utxosToUse) =>
List<_i17.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1210,10 +1210,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction(
_i21.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i16.Address>? myAddresses,
List<_i17.Address>? myAddresses,
_i20.Coin? coin,
int? minConfirms,
String? walletId,
@ -1231,8 +1231,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
],
),
returnValue:
_i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value(
_FakeTuple2_13<_i16.Transaction, _i16.Address>(
_i21.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_13<_i17.Transaction, _i17.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1246,7 +1246,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
],
),
)),
) as _i21.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>);
) as _i21.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1256,6 +1256,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
required _i12.MainDB? db,
required _i9.ElectrumX? electrumXClient,
required _i27.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i21.Future<String?> Function()? getMnemonicString,
@ -1274,7 +1275,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
})?
prepareSend,
required _i21.Future<int> Function({required String address})? getTxCount,
required _i21.Future<List<_i26.SigningData>> Function(List<_i16.UTXO>)?
required _i21.Future<List<_i26.SigningData>> Function(List<_i17.UTXO>)?
fetchBuildTxData,
required _i21.Future<void> Function()? refresh,
required _i21.Future<void> Function()? checkChangeAddressForTransactions,
@ -1291,6 +1292,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1309,28 +1311,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i21.Future<_i16.Address> currentReceivingPaynymAddress(
_i18.PaymentCode? sender) =>
_i21.Future<_i16.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i21.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i21.Future<_i16.BIP32>);
@override
_i21.Future<_i28.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i21.Future<_i28.Uint8List>.value(_i28.Uint8List(0)),
) as _i21.Future<_i28.Uint8List>);
@override
_i21.Future<_i17.Address> currentReceivingPaynymAddress({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i21.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i21.Future<_i16.Address>);
) as _i21.Future<_i17.Address>);
@override
_i21.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i18.PaymentCode? sender) =>
_i21.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i21.Future<void>.value(),
returnValueForMissingStub: _i21.Future<void>.value(),
@ -1346,81 +1394,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValueForMissingStub: _i21.Future<void>.value(),
) as _i21.Future<void>);
@override
_i21.Future<_i17.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i21.Future<_i16.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i21.Future<_i17.BIP32>.value(_FakeBIP32_15(
returnValue: _i21.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i21.Future<_i17.BIP32>);
) as _i21.Future<_i16.BIP32>);
@override
_i21.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i21.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i21.Future<_i17.BIP32>);
@override
_i21.Future<_i18.PaymentCode> getPaymentCode(
_i25.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
_i21.Future<_i18.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i21.Future<_i18.PaymentCode>.value(_FakePaymentCode_16(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i21.Future<_i18.PaymentCode>);
@ -1445,6 +1445,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
@override
_i21.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i18.PaymentCode? paymentCode,
required bool? isSegwit,
required _i14.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1454,6 +1455,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1462,9 +1464,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
_i21.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i21.Future<Map<String, dynamic>>);
@override
_i21.Future<_i16.Address> nextUnusedSendAddressFrom({
_i21.Future<_i17.Address> nextUnusedSendAddressFrom({
required _i18.PaymentCode? pCode,
required _i17.BIP32? privateKeyNode,
required bool? isSegwit,
required _i16.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1473,29 +1476,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i21.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i21.Future<_i16.Address>);
) as _i21.Future<_i17.Address>);
@override
_i21.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1532,34 +1537,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValue: _i21.Future<bool>.value(false),
) as _i21.Future<bool>);
@override
_i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i21.Future<_i18.PaymentCode?>.value(),
) as _i21.Future<_i18.PaymentCode?>);
@override
_i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i21.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i21.Future<_i18.PaymentCode?>.value(),
) as _i21.Future<_i18.PaymentCode?>);
@ -1604,111 +1599,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i24.BitcoinWallet {
returnValueForMissingStub: _i21.Future<void>.value(),
) as _i21.Future<void>);
@override
_i21.Future<void> restoreHistoryWith(
_i18.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i21.Future<void> restoreHistoryWith({
required _i18.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i21.Future<void>.value(),
returnValueForMissingStub: _i21.Future<void>.value(),
) as _i21.Future<void>);
@override
_i21.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i25.DerivePathType? derivePathType,
required _i18.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i21.Future<_i16.Address>);
@override
_i21.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i25.DerivePathType? derivePathType,
required _i18.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i21.Future<_i16.Address>);
@override
_i21.Future<_i16.Address> getMyNotificationAddress(
_i25.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i21.Future<_i17.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i21.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i21.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i21.Future<_i16.Address>);
) as _i21.Future<_i17.Address>);
@override
_i21.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i23;
import 'dart:typed_data' as _i29;
import 'dart:ui' as _i25;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip32/bip32.dart' as _i16;
import 'package:bip47/bip47.dart' as _i18;
import 'package:bitcoindart/bitcoindart.dart' as _i13;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9;
import 'package:stackwallet/models/balance.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/node_model.dart' as _i30;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8;
import 'package:stackwallet/models/signing_data.dart' as _i28;
@ -193,8 +193,8 @@ class _FakeTuple2_13<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
_FakeAddress_14(
class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 {
_FakeBIP32_14(
Object parent,
Invocation parentInvocation,
) : super(
@ -203,8 +203,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
);
}
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -778,16 +778,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i22.Coin.bitcoin,
) as _i22.Coin);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -1196,7 +1196,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -1213,7 +1213,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
));
@override
_i23.Future<List<_i28.SigningData>> fetchBuildTxData(
List<_i16.UTXO>? utxosToUse) =>
List<_i17.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1467,10 +1467,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i16.Address>? myAddresses,
List<_i17.Address>? myAddresses,
_i22.Coin? coin,
int? minConfirms,
String? walletId,
@ -1488,8 +1488,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
returnValue:
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value(
_FakeTuple2_13<_i16.Transaction, _i16.Address>(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_13<_i17.Transaction, _i17.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1503,7 +1503,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
)),
) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>);
) as _i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1513,6 +1513,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required _i12.MainDB? db,
required _i9.ElectrumX? electrumXClient,
required _i19.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i23.Future<String?> Function()? getMnemonicString,
@ -1531,7 +1532,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
})?
prepareSend,
required _i23.Future<int> Function({required String address})? getTxCount,
required _i23.Future<List<_i28.SigningData>> Function(List<_i16.UTXO>)?
required _i23.Future<List<_i28.SigningData>> Function(List<_i17.UTXO>)?
fetchBuildTxData,
required _i23.Future<void> Function()? refresh,
required _i23.Future<void> Function()? checkChangeAddressForTransactions,
@ -1548,6 +1549,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1566,28 +1568,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i16.Address> currentReceivingPaynymAddress(
_i18.PaymentCode? sender) =>
_i23.Future<_i16.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i29.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)),
) as _i23.Future<_i29.Uint8List>);
@override
_i23.Future<_i17.Address> currentReceivingPaynymAddress({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i18.PaymentCode? sender) =>
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
@ -1603,81 +1651,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i17.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i23.Future<_i16.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i23.Future<_i17.BIP32>);
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i23.Future<_i17.BIP32>);
@override
_i23.Future<_i18.PaymentCode> getPaymentCode(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
_i23.Future<_i18.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i23.Future<_i18.PaymentCode>);
@ -1702,6 +1702,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
@override
_i23.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i18.PaymentCode? paymentCode,
required bool? isSegwit,
required _i14.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1711,6 +1712,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1719,9 +1721,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
_i23.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i23.Future<Map<String, dynamic>>);
@override
_i23.Future<_i16.Address> nextUnusedSendAddressFrom({
_i23.Future<_i17.Address> nextUnusedSendAddressFrom({
required _i18.PaymentCode? pCode,
required _i17.BIP32? privateKeyNode,
required bool? isSegwit,
required _i16.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1730,29 +1733,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1789,34 +1794,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i23.Future<bool>.value(false),
) as _i23.Future<bool>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@ -1861,111 +1856,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<void> restoreHistoryWith(
_i18.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i23.Future<void> restoreHistoryWith({
required _i18.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> getMyNotificationAddress(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i23.Future<_i17.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(
@ -2323,16 +2247,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -2691,16 +2615,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i20.CoinServiceAPI {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(

View file

@ -7,7 +7,7 @@ import 'dart:async' as _i23;
import 'dart:typed_data' as _i29;
import 'dart:ui' as _i25;
import 'package:bip32/bip32.dart' as _i17;
import 'package:bip32/bip32.dart' as _i16;
import 'package:bip47/bip47.dart' as _i18;
import 'package:bitcoindart/bitcoindart.dart' as _i13;
import 'package:flutter/foundation.dart' as _i4;
@ -17,7 +17,7 @@ import 'package:stackwallet/db/isar/main_db.dart' as _i12;
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i10;
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i9;
import 'package:stackwallet/models/balance.dart' as _i11;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i16;
import 'package:stackwallet/models/isar/models/isar_models.dart' as _i17;
import 'package:stackwallet/models/node_model.dart' as _i30;
import 'package:stackwallet/models/paymint/fee_object_model.dart' as _i8;
import 'package:stackwallet/models/signing_data.dart' as _i28;
@ -193,8 +193,8 @@ class _FakeTuple2_13<T1, T2> extends _i1.SmartFake
);
}
class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
_FakeAddress_14(
class _FakeBIP32_14 extends _i1.SmartFake implements _i16.BIP32 {
_FakeBIP32_14(
Object parent,
Invocation parentInvocation,
) : super(
@ -203,8 +203,8 @@ class _FakeAddress_14 extends _i1.SmartFake implements _i16.Address {
);
}
class _FakeBIP32_15 extends _i1.SmartFake implements _i17.BIP32 {
_FakeBIP32_15(
class _FakeAddress_15 extends _i1.SmartFake implements _i17.Address {
_FakeAddress_15(
Object parent,
Invocation parentInvocation,
) : super(
@ -778,16 +778,16 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i22.Coin.bitcoin,
) as _i22.Coin);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<String> get currentReceivingAddress => (super.noSuchMethod(
Invocation.getter(#currentReceivingAddress),
@ -1196,7 +1196,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required bool? coinControl,
required bool? isSendAll,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
super.noSuchMethod(Invocation.method(
#coinSelection,
@ -1213,7 +1213,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
));
@override
_i23.Future<List<_i28.SigningData>> fetchBuildTxData(
List<_i16.UTXO>? utxosToUse) =>
List<_i17.UTXO>? utxosToUse) =>
(super.noSuchMethod(
Invocation.method(
#fetchBuildTxData,
@ -1467,10 +1467,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>> parseTransaction(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>> parseTransaction(
Map<String, dynamic>? txData,
dynamic electrumxClient,
List<_i16.Address>? myAddresses,
List<_i17.Address>? myAddresses,
_i22.Coin? coin,
int? minConfirms,
String? walletId,
@ -1488,8 +1488,8 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
returnValue:
_i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>.value(
_FakeTuple2_13<_i16.Transaction, _i16.Address>(
_i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>.value(
_FakeTuple2_13<_i17.Transaction, _i17.Address>(
this,
Invocation.method(
#parseTransaction,
@ -1503,7 +1503,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
],
),
)),
) as _i23.Future<_i15.Tuple2<_i16.Transaction, _i16.Address>>);
) as _i23.Future<_i15.Tuple2<_i17.Transaction, _i17.Address>>);
@override
void initPaynymWalletInterface({
required String? walletId,
@ -1513,6 +1513,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
required _i12.MainDB? db,
required _i9.ElectrumX? electrumXClient,
required _i19.SecureStorageInterface? secureStorage,
required int? dustLimit,
required int? dustLimitP2PKH,
required int? minConfirms,
required _i23.Future<String?> Function()? getMnemonicString,
@ -1531,7 +1532,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
})?
prepareSend,
required _i23.Future<int> Function({required String address})? getTxCount,
required _i23.Future<List<_i28.SigningData>> Function(List<_i16.UTXO>)?
required _i23.Future<List<_i28.SigningData>> Function(List<_i17.UTXO>)?
fetchBuildTxData,
required _i23.Future<void> Function()? refresh,
required _i23.Future<void> Function()? checkChangeAddressForTransactions,
@ -1548,6 +1549,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
#db: db,
#electrumXClient: electrumXClient,
#secureStorage: secureStorage,
#dustLimit: dustLimit,
#dustLimitP2PKH: dustLimitP2PKH,
#minConfirms: minConfirms,
#getMnemonicString: getMnemonicString,
@ -1566,28 +1568,74 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: null,
);
@override
_i23.Future<_i16.Address> currentReceivingPaynymAddress(
_i18.PaymentCode? sender) =>
_i23.Future<_i16.BIP32> getBip47BaseNode() => (super.noSuchMethod(
Invocation.method(
#getBip47BaseNode,
[],
),
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#getBip47BaseNode,
[],
),
)),
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i29.Uint8List> getPrivateKeyForPaynymReceivingAddress({
required String? paymentCodeString,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#getPrivateKeyForPaynymReceivingAddress,
[],
{
#paymentCodeString: paymentCodeString,
#index: index,
},
),
returnValue: _i23.Future<_i29.Uint8List>.value(_i29.Uint8List(0)),
) as _i23.Future<_i29.Uint8List>);
@override
_i23.Future<_i17.Address> currentReceivingPaynymAddress({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#currentReceivingPaynymAddress,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions(
_i18.PaymentCode? sender) =>
_i23.Future<void> checkCurrentPaynymReceivingAddressForTransactions({
required _i18.PaymentCode? sender,
required bool? isSegwit,
}) =>
(super.noSuchMethod(
Invocation.method(
#checkCurrentPaynymReceivingAddressForTransactions,
[sender],
[],
{
#sender: sender,
#isSegwit: isSegwit,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
@ -1603,81 +1651,33 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i17.BIP32> deriveNotificationBip32Node({
required String? mnemonic,
required String? mnemonicPassphrase,
}) =>
(super.noSuchMethod(
_i23.Future<_i16.BIP32> deriveNotificationBip32Node() => (super.noSuchMethod(
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
returnValue: _i23.Future<_i16.BIP32>.value(_FakeBIP32_14(
this,
Invocation.method(
#deriveNotificationBip32Node,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
},
),
)),
) as _i23.Future<_i17.BIP32>);
) as _i23.Future<_i16.BIP32>);
@override
_i23.Future<_i17.BIP32> deriveReceivingPrivateKeyNode({
required String? mnemonic,
required String? mnemonicPassphrase,
required int? index,
}) =>
(super.noSuchMethod(
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
returnValue: _i23.Future<_i17.BIP32>.value(_FakeBIP32_15(
this,
Invocation.method(
#deriveReceivingPrivateKeyNode,
[],
{
#mnemonic: mnemonic,
#mnemonicPassphrase: mnemonicPassphrase,
#index: index,
},
),
)),
) as _i23.Future<_i17.BIP32>);
@override
_i23.Future<_i18.PaymentCode> getPaymentCode(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
_i23.Future<_i18.PaymentCode> getPaymentCode({required bool? isSegwit}) =>
(super.noSuchMethod(
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
returnValue: _i23.Future<_i18.PaymentCode>.value(_FakePaymentCode_16(
this,
Invocation.method(
#getPaymentCode,
[
derivePathType,
bip32Root,
],
[],
{#isSegwit: isSegwit},
),
)),
) as _i23.Future<_i18.PaymentCode>);
@ -1702,6 +1702,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
@override
_i23.Future<Map<String, dynamic>> preparePaymentCodeSend({
required _i18.PaymentCode? paymentCode,
required bool? isSegwit,
required _i14.Amount? amount,
Map<String, dynamic>? args,
}) =>
@ -1711,6 +1712,7 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#paymentCode: paymentCode,
#isSegwit: isSegwit,
#amount: amount,
#args: args,
},
@ -1719,9 +1721,10 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
_i23.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
) as _i23.Future<Map<String, dynamic>>);
@override
_i23.Future<_i16.Address> nextUnusedSendAddressFrom({
_i23.Future<_i17.Address> nextUnusedSendAddressFrom({
required _i18.PaymentCode? pCode,
required _i17.BIP32? privateKeyNode,
required bool? isSegwit,
required _i16.BIP32? privateKeyNode,
int? startIndex = 0,
}) =>
(super.noSuchMethod(
@ -1730,29 +1733,31 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#nextUnusedSendAddressFrom,
[],
{
#pCode: pCode,
#isSegwit: isSegwit,
#privateKeyNode: privateKeyNode,
#startIndex: startIndex,
},
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<Map<String, dynamic>> prepareNotificationTx({
required int? selectedTxFeeRate,
required String? targetPaymentCodeString,
int? additionalOutputs = 0,
List<_i16.UTXO>? utxos,
List<_i17.UTXO>? utxos,
}) =>
(super.noSuchMethod(
Invocation.method(
@ -1789,34 +1794,24 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValue: _i23.Future<bool>.value(false),
) as _i23.Future<bool>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransaction(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransaction,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@override
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad({
required _i16.Transaction? transaction,
required _i16.Address? myNotificationAddress,
}) =>
_i23.Future<_i18.PaymentCode?> unBlindedPaymentCodeFromTransactionBad(
{required _i17.Transaction? transaction}) =>
(super.noSuchMethod(
Invocation.method(
#unBlindedPaymentCodeFromTransactionBad,
[],
{
#transaction: transaction,
#myNotificationAddress: myNotificationAddress,
},
{#transaction: transaction},
),
returnValue: _i23.Future<_i18.PaymentCode?>.value(),
) as _i23.Future<_i18.PaymentCode?>);
@ -1861,111 +1856,40 @@ class MockBitcoinWallet extends _i1.Mock implements _i26.BitcoinWallet {
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<void> restoreHistoryWith(
_i18.PaymentCode? other,
int? maxUnusedAddressGap,
int? maxNumberOfIndexesToCheck,
) =>
_i23.Future<void> restoreHistoryWith({
required _i18.PaymentCode? other,
required bool? checkSegwitAsWell,
required int? maxUnusedAddressGap,
required int? maxNumberOfIndexesToCheck,
}) =>
(super.noSuchMethod(
Invocation.method(
#restoreHistoryWith,
[
other,
maxUnusedAddressGap,
maxNumberOfIndexesToCheck,
],
[],
{
#other: other,
#checkSegwitAsWell: checkSegwitAsWell,
#maxUnusedAddressGap: maxUnusedAddressGap,
#maxNumberOfIndexesToCheck: maxNumberOfIndexesToCheck,
},
),
returnValue: _i23.Future<void>.value(),
returnValueForMissingStub: _i23.Future<void>.value(),
) as _i23.Future<void>);
@override
_i23.Future<_i16.Address> generatePaynymSendAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? toPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymSendAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#toPaymentCode: toPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> generatePaynymReceivingAddressFromKeyPair({
required _i13.ECPair? pair,
required int? derivationIndex,
required _i27.DerivePathType? derivePathType,
required _i18.PaymentCode? fromPaymentCode,
}) =>
(super.noSuchMethod(
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
this,
Invocation.method(
#generatePaynymReceivingAddressFromKeyPair,
[],
{
#pair: pair,
#derivationIndex: derivationIndex,
#derivePathType: derivePathType,
#fromPaymentCode: fromPaymentCode,
},
),
)),
) as _i23.Future<_i16.Address>);
@override
_i23.Future<_i16.Address> getMyNotificationAddress(
_i27.DerivePathType? derivePathType, [
_i17.BIP32? bip32Root,
]) =>
(super.noSuchMethod(
_i23.Future<_i17.Address> getMyNotificationAddress() => (super.noSuchMethod(
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
returnValue: _i23.Future<_i16.Address>.value(_FakeAddress_14(
returnValue: _i23.Future<_i17.Address>.value(_FakeAddress_15(
this,
Invocation.method(
#getMyNotificationAddress,
[
derivePathType,
bip32Root,
],
[],
),
)),
) as _i23.Future<_i16.Address>);
) as _i23.Future<_i17.Address>);
@override
_i23.Future<List<String>> lookupKey(String? paymentCodeString) =>
(super.noSuchMethod(
@ -2323,16 +2247,16 @@ class MockManager extends _i1.Mock implements _i6.Manager {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(
@ -2691,16 +2615,16 @@ class MockCoinServiceAPI extends _i1.Mock implements _i20.CoinServiceAPI {
),
) as _i11.Balance);
@override
_i23.Future<List<_i16.Transaction>> get transactions => (super.noSuchMethod(
_i23.Future<List<_i17.Transaction>> get transactions => (super.noSuchMethod(
Invocation.getter(#transactions),
returnValue:
_i23.Future<List<_i16.Transaction>>.value(<_i16.Transaction>[]),
) as _i23.Future<List<_i16.Transaction>>);
_i23.Future<List<_i17.Transaction>>.value(<_i17.Transaction>[]),
) as _i23.Future<List<_i17.Transaction>>);
@override
_i23.Future<List<_i16.UTXO>> get utxos => (super.noSuchMethod(
_i23.Future<List<_i17.UTXO>> get utxos => (super.noSuchMethod(
Invocation.getter(#utxos),
returnValue: _i23.Future<List<_i16.UTXO>>.value(<_i16.UTXO>[]),
) as _i23.Future<List<_i16.UTXO>>);
returnValue: _i23.Future<List<_i17.UTXO>>.value(<_i17.UTXO>[]),
) as _i23.Future<List<_i17.UTXO>>);
@override
set walletName(String? newName) => super.noSuchMethod(
Invocation.setter(