mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
commit
9207e0d987
23 changed files with 1461 additions and 1808 deletions
|
@ -4,6 +4,7 @@ import 'package:stackwallet/models/paynym/paynym_code.dart';
|
|||
class PaynymAccount {
|
||||
final String nymID;
|
||||
final String nymName;
|
||||
final bool segwit;
|
||||
|
||||
final List<PaynymCode> codes;
|
||||
|
||||
|
@ -13,9 +14,13 @@ class PaynymAccount {
|
|||
/// list of nymId
|
||||
final List<PaynymAccountLite> following;
|
||||
|
||||
PaynymCode get nonSegwitPaymentCode =>
|
||||
codes.firstWhere((element) => !element.segwit);
|
||||
|
||||
PaynymAccount(
|
||||
this.nymID,
|
||||
this.nymName,
|
||||
this.segwit,
|
||||
this.codes,
|
||||
this.followers,
|
||||
this.following,
|
||||
|
@ -24,6 +29,7 @@ class PaynymAccount {
|
|||
PaynymAccount.fromMap(Map<String, dynamic> map)
|
||||
: nymID = map["nymID"] as String,
|
||||
nymName = map["nymName"] as String,
|
||||
segwit = map["segwit"] as bool,
|
||||
codes = (map["codes"] as List<dynamic>)
|
||||
.map((e) => PaynymCode.fromMap(Map<String, dynamic>.from(e as Map)))
|
||||
.toList(),
|
||||
|
@ -39,6 +45,7 @@ class PaynymAccount {
|
|||
PaynymAccount copyWith({
|
||||
String? nymID,
|
||||
String? nymName,
|
||||
bool? segwit,
|
||||
List<PaynymCode>? codes,
|
||||
List<PaynymAccountLite>? followers,
|
||||
List<PaynymAccountLite>? following,
|
||||
|
@ -46,6 +53,7 @@ class PaynymAccount {
|
|||
return PaynymAccount(
|
||||
nymID ?? this.nymID,
|
||||
nymName ?? this.nymName,
|
||||
segwit ?? this.segwit,
|
||||
codes ?? this.codes,
|
||||
followers ?? this.followers,
|
||||
following ?? this.following,
|
||||
|
@ -55,6 +63,7 @@ class PaynymAccount {
|
|||
Map<String, dynamic> toMap() => {
|
||||
"nymID": nymID,
|
||||
"nymName": nymName,
|
||||
"segwit": segwit,
|
||||
"codes": codes.map((e) => e.toMap()),
|
||||
"followers": followers.map((e) => e.toMap()),
|
||||
"following": followers.map((e) => e.toMap()),
|
||||
|
|
|
@ -447,7 +447,7 @@ class _AddNewPaynymFollowViewState
|
|||
child: PaynymCard(
|
||||
key: UniqueKey(),
|
||||
label: _searchResult!.nymName,
|
||||
paymentCodeString: _searchResult!.codes.first.code,
|
||||
paymentCodeString: _searchResult!.nonSegwitPaymentCode.code,
|
||||
walletId: widget.walletId,
|
||||
),
|
||||
),
|
||||
|
|
|
@ -55,7 +55,7 @@ class PaynymQrPopup extends StatelessWidget {
|
|||
child: Row(
|
||||
children: [
|
||||
PayNymBot(
|
||||
paymentCodeString: paynymAccount.codes.first.code,
|
||||
paymentCodeString: paynymAccount.nonSegwitPaymentCode.code,
|
||||
size: isDesktop ? 56 : 36,
|
||||
),
|
||||
const SizedBox(
|
||||
|
@ -108,7 +108,7 @@ class PaynymQrPopup extends StatelessWidget {
|
|||
height: 6,
|
||||
),
|
||||
Text(
|
||||
paynymAccount.codes.first.code,
|
||||
paynymAccount.nonSegwitPaymentCode.code,
|
||||
style: isDesktop
|
||||
? STextStyles.desktopTextSmall(context)
|
||||
: STextStyles.infoSmall(context).copyWith(
|
||||
|
@ -127,7 +127,7 @@ class PaynymQrPopup extends StatelessWidget {
|
|||
onTap: () async {
|
||||
await Clipboard.setData(
|
||||
ClipboardData(
|
||||
text: paynymAccount.codes.first.code,
|
||||
text: paynymAccount.nonSegwitPaymentCode.code,
|
||||
),
|
||||
);
|
||||
unawaited(
|
||||
|
@ -150,7 +150,7 @@ class PaynymQrPopup extends StatelessWidget {
|
|||
QrImage(
|
||||
padding: const EdgeInsets.all(0),
|
||||
size: 130,
|
||||
data: paynymAccount.codes.first.code,
|
||||
data: paynymAccount.nonSegwitPaymentCode.code,
|
||||
foregroundColor:
|
||||
Theme.of(context).extension<StackColors>()!.textDark,
|
||||
),
|
||||
|
|
|
@ -3,6 +3,7 @@ import 'dart:async';
|
|||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:flutter_svg/flutter_svg.dart';
|
||||
import 'package:stackwallet/models/paynym/paynym_account.dart';
|
||||
import 'package:stackwallet/pages/paynym/dialogs/claiming_paynym_dialog.dart';
|
||||
import 'package:stackwallet/pages/paynym/paynym_home_view.dart';
|
||||
import 'package:stackwallet/pages/wallet_view/wallet_view.dart';
|
||||
|
@ -11,7 +12,6 @@ import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|||
import 'package:stackwallet/providers/wallet/my_paynym_account_state_provider.dart';
|
||||
import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
|
@ -36,6 +36,29 @@ class PaynymClaimView extends ConsumerStatefulWidget {
|
|||
}
|
||||
|
||||
class _PaynymClaimViewState extends ConsumerState<PaynymClaimView> {
|
||||
Future<bool> _addSegwitCode(PaynymAccount myAccount) async {
|
||||
final manager =
|
||||
ref.read(walletsChangeNotifierProvider).getManager(widget.walletId);
|
||||
|
||||
// get wallet to access paynym calls
|
||||
final wallet = manager.wallet as PaynymWalletInterface;
|
||||
|
||||
final token = await ref
|
||||
.read(paynymAPIProvider)
|
||||
.token(myAccount.nonSegwitPaymentCode.code);
|
||||
final signature = await wallet.signStringWithNotificationKey(token.value!);
|
||||
|
||||
final pCodeSegwit = await wallet.getPaymentCode(isSegwit: true);
|
||||
final addResult = await ref.read(paynymAPIProvider).add(
|
||||
token.value!,
|
||||
signature,
|
||||
myAccount.nymID,
|
||||
pCodeSegwit.toString(),
|
||||
);
|
||||
|
||||
return addResult.value ?? false;
|
||||
}
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
debugPrint("BUILD: $runtimeType");
|
||||
|
@ -169,8 +192,7 @@ class _PaynymClaimViewState extends ConsumerState<PaynymClaimView> {
|
|||
if (shouldCancel) return;
|
||||
|
||||
// get payment code
|
||||
final pCode = await wallet.getPaymentCode(
|
||||
DerivePathTypeExt.primaryFor(manager.coin));
|
||||
final pCode = await wallet.getPaymentCode(isSegwit: false);
|
||||
|
||||
if (shouldCancel) return;
|
||||
|
||||
|
@ -185,6 +207,18 @@ class _PaynymClaimViewState extends ConsumerState<PaynymClaimView> {
|
|||
if (created.value!.claimed) {
|
||||
// payment code already claimed
|
||||
debugPrint("pcode already claimed!!");
|
||||
|
||||
final account =
|
||||
await ref.read(paynymAPIProvider).nym(pCode.toString());
|
||||
if (!account.value!.segwit) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
final result = await _addSegwitCode(account.value!);
|
||||
if (result == true) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (mounted) {
|
||||
if (isDesktop) {
|
||||
Navigator.of(context, rootNavigator: true).pop();
|
||||
|
@ -223,6 +257,14 @@ class _PaynymClaimViewState extends ConsumerState<PaynymClaimView> {
|
|||
if (claim.value?.claimed == pCode.toString()) {
|
||||
final account =
|
||||
await ref.read(paynymAPIProvider).nym(pCode.toString());
|
||||
if (!account.value!.segwit) {
|
||||
for (int i = 0; i < 100; i++) {
|
||||
final result = await _addSegwitCode(account.value!);
|
||||
if (result == true) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
ref.read(myPaynymAccountStateProvider.state).state =
|
||||
account.value!;
|
||||
|
|
|
@ -275,8 +275,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
paymentCodeString: ref
|
||||
.watch(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
),
|
||||
),
|
||||
|
@ -298,8 +297,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
ref
|
||||
.watch(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
12,
|
||||
5),
|
||||
|
@ -330,8 +328,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
text: ref
|
||||
.read(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
),
|
||||
);
|
||||
|
@ -376,8 +373,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
ref
|
||||
.read(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
sharePositionOrigin: sharePositionOrigin);
|
||||
},
|
||||
|
@ -447,8 +443,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
paymentCodeString: ref
|
||||
.watch(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
),
|
||||
),
|
||||
|
@ -473,8 +468,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
ref
|
||||
.watch(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
12,
|
||||
5),
|
||||
|
@ -501,8 +495,7 @@ class _PaynymHomeViewState extends ConsumerState<PaynymHomeView> {
|
|||
text: ref
|
||||
.read(myPaynymAccountStateProvider.state)
|
||||
.state!
|
||||
.codes
|
||||
.first
|
||||
.nonSegwitPaymentCode
|
||||
.code,
|
||||
),
|
||||
);
|
||||
|
|
|
@ -8,7 +8,6 @@ import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|||
import 'package:stackwallet/providers/wallet/my_paynym_account_state_provider.dart';
|
||||
import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
@ -75,7 +74,7 @@ class _PaynymFollowersListState extends ConsumerState<PaynymFollowersList> {
|
|||
|
||||
// get payment code
|
||||
final pCode = await wallet.getPaymentCode(
|
||||
DerivePathTypeExt.primaryFor(manager.coin),
|
||||
isSegwit: false,
|
||||
);
|
||||
|
||||
// get account from api
|
||||
|
|
|
@ -8,7 +8,6 @@ import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|||
import 'package:stackwallet/providers/wallet/my_paynym_account_state_provider.dart';
|
||||
import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
@ -75,7 +74,7 @@ class _PaynymFollowingListState extends ConsumerState<PaynymFollowingList> {
|
|||
|
||||
// get payment code
|
||||
final pCode = await wallet.getPaymentCode(
|
||||
DerivePathTypeExt.primaryFor(manager.coin),
|
||||
isSegwit: false,
|
||||
);
|
||||
|
||||
// get account from api
|
||||
|
|
|
@ -453,11 +453,12 @@ class _SendViewState extends ConsumerState<SendView> {
|
|||
final wallet = manager.wallet as PaynymWalletInterface;
|
||||
final paymentCode = PaymentCode.fromPaymentCode(
|
||||
widget.accountLite!.code,
|
||||
wallet.networkType,
|
||||
networkType: wallet.networkType,
|
||||
);
|
||||
final feeRate = ref.read(feeRateTypeStateProvider);
|
||||
txDataFuture = wallet.preparePaymentCodeSend(
|
||||
paymentCode: paymentCode,
|
||||
isSegwit: widget.accountLite!.segwit,
|
||||
amount: amount,
|
||||
args: {
|
||||
"feeRate": feeRate,
|
||||
|
|
|
@ -43,7 +43,6 @@ import 'package:stackwallet/utilities/clipboard_interface.dart';
|
|||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/backup_frequency_type.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/enums/wallet_balance_toggle_state.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/show_loading.dart';
|
||||
|
@ -909,7 +908,8 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
manager.wallet as PaynymWalletInterface;
|
||||
|
||||
final code = await paynymInterface.getPaymentCode(
|
||||
DerivePathTypeExt.primaryFor(manager.coin));
|
||||
isSegwit: false,
|
||||
);
|
||||
|
||||
final account = await ref
|
||||
.read(paynymAPIProvider)
|
||||
|
@ -925,7 +925,8 @@ class _WalletViewState extends ConsumerState<WalletView> {
|
|||
|
||||
// check if account exists and for matching code to see if claimed
|
||||
if (account.value != null &&
|
||||
account.value!.codes.first.claimed) {
|
||||
account.value!.nonSegwitPaymentCode.claimed &&
|
||||
account.value!.segwit) {
|
||||
ref.read(myPaynymAccountStateProvider.state).state =
|
||||
account.value!;
|
||||
|
||||
|
|
|
@ -262,11 +262,12 @@ class _DesktopSendState extends ConsumerState<DesktopSend> {
|
|||
final wallet = manager.wallet as PaynymWalletInterface;
|
||||
final paymentCode = PaymentCode.fromPaymentCode(
|
||||
widget.accountLite!.code,
|
||||
wallet.networkType,
|
||||
networkType: wallet.networkType,
|
||||
);
|
||||
final feeRate = ref.read(feeRateTypeStateProvider);
|
||||
txDataFuture = wallet.preparePaymentCodeSend(
|
||||
paymentCode: paymentCode,
|
||||
isSegwit: widget.accountLite!.segwit,
|
||||
amount: amount,
|
||||
args: {
|
||||
"feeRate": feeRate,
|
||||
|
|
|
@ -21,7 +21,6 @@ import 'package:stackwallet/utilities/amount/amount.dart';
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
|
@ -271,8 +270,7 @@ class _DesktopWalletFeaturesState extends ConsumerState<DesktopWalletFeatures> {
|
|||
|
||||
final wallet = manager.wallet as PaynymWalletInterface;
|
||||
|
||||
final code =
|
||||
await wallet.getPaymentCode(DerivePathTypeExt.primaryFor(manager.coin));
|
||||
final code = await wallet.getPaymentCode(isSegwit: false);
|
||||
|
||||
final account = await ref.read(paynymAPIProvider).nym(code.toString());
|
||||
|
||||
|
@ -285,7 +283,9 @@ class _DesktopWalletFeaturesState extends ConsumerState<DesktopWalletFeatures> {
|
|||
Navigator.of(context, rootNavigator: true).pop();
|
||||
|
||||
// check if account exists and for matching code to see if claimed
|
||||
if (account.value != null && account.value!.codes.first.claimed) {
|
||||
if (account.value != null &&
|
||||
account.value!.nonSegwitPaymentCode.claimed &&
|
||||
account.value!.segwit) {
|
||||
ref.read(myPaynymAccountStateProvider.state).state = account.value!;
|
||||
|
||||
await Navigator.of(context).pushNamed(
|
||||
|
|
|
@ -164,6 +164,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
// _checkP2PKHChangeAddressForTransactions,
|
||||
dustLimitP2PKH: DUST_LIMIT_P2PKH.raw.toInt(),
|
||||
minConfirms: MINIMUM_CONFIRMATIONS,
|
||||
dustLimit: DUST_LIMIT.raw.toInt(),
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -422,7 +423,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
level: LogLevel.Info);
|
||||
}
|
||||
|
||||
Future<Tuple2<List<isar_models.Address>, DerivePathType>> _checkGaps(
|
||||
Future<Tuple3<List<isar_models.Address>, DerivePathType, int>> _checkGaps(
|
||||
int maxNumberOfIndexesToCheck,
|
||||
int maxUnusedAddressGap,
|
||||
int txCountBatchSize,
|
||||
|
@ -432,6 +433,8 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
) async {
|
||||
List<isar_models.Address> addressArray = [];
|
||||
int gapCounter = 0;
|
||||
int highestIndexWithHistory = 0;
|
||||
|
||||
for (int index = 0;
|
||||
index < maxNumberOfIndexesToCheck && gapCounter < maxUnusedAddressGap;
|
||||
index += txCountBatchSize) {
|
||||
|
@ -505,6 +508,9 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
if (count > 0) {
|
||||
iterationsAddressArray.add(txCountCallArgs["${_id}_$k"]!);
|
||||
|
||||
// update highest
|
||||
highestIndexWithHistory = index + k;
|
||||
|
||||
// reset counter
|
||||
gapCounter = 0;
|
||||
}
|
||||
|
@ -517,7 +523,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
// cache all the transactions while waiting for the current function to finish.
|
||||
unawaited(getTransactionCacheEarly(iterationsAddressArray));
|
||||
}
|
||||
return Tuple2(addressArray, type);
|
||||
return Tuple3(addressArray, type, highestIndexWithHistory);
|
||||
}
|
||||
|
||||
Future<void> getTransactionCacheEarly(List<String> allAddresses) async {
|
||||
|
@ -561,9 +567,9 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
DerivePathType.bip84,
|
||||
];
|
||||
|
||||
final List<Future<Tuple2<List<isar_models.Address>, DerivePathType>>>
|
||||
final List<Future<Tuple3<List<isar_models.Address>, DerivePathType, int>>>
|
||||
receiveFutures = [];
|
||||
final List<Future<Tuple2<List<isar_models.Address>, DerivePathType>>>
|
||||
final List<Future<Tuple3<List<isar_models.Address>, DerivePathType, int>>>
|
||||
changeFutures = [];
|
||||
|
||||
const receiveChain = 0;
|
||||
|
@ -622,6 +628,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
|
||||
final List<isar_models.Address> addressesToStore = [];
|
||||
|
||||
int highestReceivingIndexWithHistory = 0;
|
||||
// If restoring a wallet that never received any funds, then set receivingArray manually
|
||||
// If we didn't do this, it'd store an empty array
|
||||
for (final tuple in receiveResults) {
|
||||
|
@ -633,10 +640,13 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
);
|
||||
addressesToStore.add(address);
|
||||
} else {
|
||||
highestReceivingIndexWithHistory =
|
||||
max(tuple.item3, highestReceivingIndexWithHistory);
|
||||
addressesToStore.addAll(tuple.item1);
|
||||
}
|
||||
}
|
||||
|
||||
int highestChangeIndexWithHistory = 0;
|
||||
// If restoring a wallet that never sent any funds with change, then set changeArray
|
||||
// manually. If we didn't do this, it'd store an empty array.
|
||||
for (final tuple in changeResults) {
|
||||
|
@ -648,10 +658,20 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
);
|
||||
addressesToStore.add(address);
|
||||
} else {
|
||||
highestChangeIndexWithHistory =
|
||||
max(tuple.item3, highestChangeIndexWithHistory);
|
||||
addressesToStore.addAll(tuple.item1);
|
||||
}
|
||||
}
|
||||
|
||||
// remove extra addresses to help minimize risk of creating a large gap
|
||||
addressesToStore.removeWhere((e) =>
|
||||
e.subType == isar_models.AddressSubType.change &&
|
||||
e.derivationIndex > highestChangeIndexWithHistory);
|
||||
addressesToStore.removeWhere((e) =>
|
||||
e.subType == isar_models.AddressSubType.receiving &&
|
||||
e.derivationIndex > highestReceivingIndexWithHistory);
|
||||
|
||||
if (isRescan) {
|
||||
await db.updateOrPutAddresses(addressesToStore);
|
||||
} else {
|
||||
|
@ -659,10 +679,11 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
// get own payment code
|
||||
final myCode = await getPaymentCode(DerivePathType.bip44, root);
|
||||
// isSegwit does not matter here at all
|
||||
final myCode = await getPaymentCode(isSegwit: false);
|
||||
|
||||
// refresh transactions to pick up any received notification transactions
|
||||
await _refreshTransactions();
|
||||
await _refreshNotificationAddressTransactions();
|
||||
|
||||
try {
|
||||
final Set<String> codesToCheck = {};
|
||||
|
@ -691,7 +712,10 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
);
|
||||
}
|
||||
|
||||
await _updateUTXOs();
|
||||
await Future.wait([
|
||||
_refreshTransactions(),
|
||||
_updateUTXOs(),
|
||||
]);
|
||||
|
||||
await Future.wait([
|
||||
updateCachedId(walletId),
|
||||
|
@ -915,7 +939,8 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.0, walletId));
|
||||
|
||||
GlobalEventBus.instance.fire(RefreshPercentChangedEvent(0.1, walletId));
|
||||
final myCode = await getPaymentCode(DerivePathType.bip44);
|
||||
// isSegwit does not matter here at all
|
||||
final myCode = await getPaymentCode(isSegwit: false);
|
||||
final Set<String> codesToCheck = {};
|
||||
final nym = await PaynymIsApi().nym(myCode.toString());
|
||||
if (nym.value != null) {
|
||||
|
@ -1221,6 +1246,11 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
await _prefs.init();
|
||||
|
||||
// this will add the notification address to the db if it isn't
|
||||
// already there for older wallets
|
||||
await getMyNotificationAddress();
|
||||
|
||||
// await _checkCurrentChangeAddressesForTransactions();
|
||||
// await _checkCurrentReceivingAddressesForTransactions();
|
||||
}
|
||||
|
@ -1346,10 +1376,12 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.not()
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.and()
|
||||
.not()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.nonWallet)
|
||||
.group(
|
||||
(q) => q
|
||||
.typeEqualTo(isar_models.AddressType.nonWallet)
|
||||
.or()
|
||||
.subTypeEqualTo(isar_models.AddressSubType.nonWallet),
|
||||
)
|
||||
.findAll();
|
||||
return allAddresses;
|
||||
}
|
||||
|
@ -1444,6 +1476,10 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
_generateAddressForChain(1, 0, DerivePathType.bip49),
|
||||
]);
|
||||
|
||||
// this will add the notification address to the db if it isn't
|
||||
// already there so it can be watched
|
||||
await getMyNotificationAddress();
|
||||
|
||||
await db.putAddresses(initialAddresses);
|
||||
|
||||
Logging.instance.log("_generateNewWalletFinished", level: LogLevel.Info);
|
||||
|
@ -1517,42 +1553,6 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
);
|
||||
}
|
||||
|
||||
/// Returns the latest receiving/change (external/internal) address for the wallet depending on [chain]
|
||||
/// and
|
||||
/// [chain] - Use 0 for receiving (external), 1 for change (internal). Should not be any other value!
|
||||
Future<String> _getCurrentAddressForChain(
|
||||
int chain,
|
||||
DerivePathType derivePathType,
|
||||
) async {
|
||||
final subType = chain == 0 // Here, we assume that chain == 1 if it isn't 0
|
||||
? isar_models.AddressSubType.receiving
|
||||
: isar_models.AddressSubType.change;
|
||||
|
||||
isar_models.AddressType type;
|
||||
isar_models.Address? address;
|
||||
switch (derivePathType) {
|
||||
case DerivePathType.bip44:
|
||||
type = isar_models.AddressType.p2pkh;
|
||||
break;
|
||||
case DerivePathType.bip49:
|
||||
type = isar_models.AddressType.p2sh;
|
||||
break;
|
||||
case DerivePathType.bip84:
|
||||
type = isar_models.AddressType.p2wpkh;
|
||||
break;
|
||||
default:
|
||||
throw Exception("DerivePathType unsupported");
|
||||
}
|
||||
address = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.typeEqualTo(type)
|
||||
.subTypeEqualTo(subType)
|
||||
.sortByDerivationIndexDesc()
|
||||
.findFirst();
|
||||
return address!.value;
|
||||
}
|
||||
|
||||
String _buildDerivationStorageKey({
|
||||
required int chain,
|
||||
required DerivePathType derivePathType,
|
||||
|
@ -2020,6 +2020,60 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
return false;
|
||||
}
|
||||
|
||||
Future<void> _refreshNotificationAddressTransactions() async {
|
||||
final address = await getMyNotificationAddress();
|
||||
final hashes = await _fetchHistory([address.value]);
|
||||
|
||||
List<Map<String, dynamic>> allTransactions = [];
|
||||
|
||||
final currentHeight = await chainHeight;
|
||||
|
||||
for (final txHash in hashes) {
|
||||
final storedTx = await db
|
||||
.getTransactions(walletId)
|
||||
.filter()
|
||||
.txidEqualTo(txHash["tx_hash"] as String)
|
||||
.findFirst();
|
||||
|
||||
// TODO: remove bip47Notification type check sometime after Q2 2023
|
||||
if (storedTx == null ||
|
||||
storedTx.subType ==
|
||||
isar_models.TransactionSubType.bip47Notification ||
|
||||
!storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS)) {
|
||||
final tx = await cachedElectrumXClient.getTransaction(
|
||||
txHash: txHash["tx_hash"] as String,
|
||||
verbose: true,
|
||||
coin: coin,
|
||||
);
|
||||
|
||||
tx["address"] = await db
|
||||
.getAddresses(walletId)
|
||||
.filter()
|
||||
.valueEqualTo(txHash["address"] as String)
|
||||
.findFirst();
|
||||
tx["height"] = txHash["height"];
|
||||
allTransactions.add(tx);
|
||||
}
|
||||
}
|
||||
|
||||
final List<Tuple2<isar_models.Transaction, isar_models.Address?>> txnsData =
|
||||
[];
|
||||
|
||||
for (final txObject in allTransactions) {
|
||||
final data = await parseTransaction(
|
||||
txObject,
|
||||
cachedElectrumXClient,
|
||||
[address],
|
||||
coin,
|
||||
MINIMUM_CONFIRMATIONS,
|
||||
walletId,
|
||||
);
|
||||
|
||||
txnsData.add(data);
|
||||
}
|
||||
await db.addNewTransactionData(txnsData, walletId);
|
||||
}
|
||||
|
||||
Future<void> _refreshTransactions() async {
|
||||
final List<isar_models.Address> allAddresses =
|
||||
await _fetchAllOwnAddresses();
|
||||
|
@ -2282,8 +2336,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
utxoSigningData: utxoSigningData,
|
||||
recipients: [
|
||||
recipientAddress,
|
||||
await _getCurrentAddressForChain(
|
||||
1, DerivePathTypeExt.primaryFor(coin)),
|
||||
await currentChangeAddress,
|
||||
],
|
||||
satoshiAmounts: [
|
||||
satoshiAmountToSend,
|
||||
|
@ -2326,8 +2379,7 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
feeForTwoOutputs) {
|
||||
// generate new change address if current change address has been used
|
||||
await _checkChangeAddressForTransactions();
|
||||
final String newChangeAddress = await _getCurrentAddressForChain(
|
||||
1, DerivePathTypeExt.primaryFor(coin));
|
||||
final String newChangeAddress = await currentChangeAddress;
|
||||
|
||||
int feeBeingPaid =
|
||||
satoshisBeingUsed - satoshiAmountToSend - changeOutputSize;
|
||||
|
@ -2554,43 +2606,67 @@ class BitcoinWallet extends CoinServiceAPI
|
|||
String? pubKey;
|
||||
String? wif;
|
||||
|
||||
// fetch receiving derivations if null
|
||||
receiveDerivations[sd.derivePathType] ??= await _fetchDerivations(
|
||||
chain: 0,
|
||||
derivePathType: sd.derivePathType,
|
||||
);
|
||||
final receiveDerivation =
|
||||
receiveDerivations[sd.derivePathType]![sd.utxo.address!];
|
||||
final address = await db.getAddress(walletId, sd.utxo.address!);
|
||||
if (address?.derivationPath != null) {
|
||||
final bip32.BIP32 node;
|
||||
if (address!.subType == isar_models.AddressSubType.paynymReceive) {
|
||||
final code = await paymentCodeStringByKey(address.otherData!);
|
||||
|
||||
if (receiveDerivation != null) {
|
||||
pubKey = receiveDerivation["pubKey"] as String;
|
||||
wif = receiveDerivation["wif"] as String;
|
||||
} else {
|
||||
// fetch change derivations if null
|
||||
changeDerivations[sd.derivePathType] ??= await _fetchDerivations(
|
||||
chain: 1,
|
||||
derivePathType: sd.derivePathType,
|
||||
);
|
||||
final changeDerivation =
|
||||
changeDerivations[sd.derivePathType]![sd.utxo.address!];
|
||||
if (changeDerivation != null) {
|
||||
pubKey = changeDerivation["pubKey"] as String;
|
||||
wif = changeDerivation["wif"] as String;
|
||||
}
|
||||
}
|
||||
final bip47base = await getBip47BaseNode();
|
||||
|
||||
if (wif == null || pubKey == null) {
|
||||
final address = await db.getAddress(walletId, sd.utxo.address!);
|
||||
if (address?.derivationPath != null) {
|
||||
final node = await Bip32Utils.getBip32Node(
|
||||
final privateKey = await getPrivateKeyForPaynymReceivingAddress(
|
||||
paymentCodeString: code!,
|
||||
index: address.derivationIndex,
|
||||
);
|
||||
|
||||
node = bip32.BIP32.fromPrivateKey(
|
||||
privateKey,
|
||||
bip47base.chainCode,
|
||||
bip32.NetworkType(
|
||||
wif: _network.wif,
|
||||
bip32: bip32.Bip32Type(
|
||||
public: _network.bip32.public,
|
||||
private: _network.bip32.private,
|
||||
),
|
||||
),
|
||||
);
|
||||
} else {
|
||||
node = await Bip32Utils.getBip32Node(
|
||||
(await mnemonicString)!,
|
||||
(await mnemonicPassphrase)!,
|
||||
_network,
|
||||
address!.derivationPath!.value,
|
||||
address.derivationPath!.value,
|
||||
);
|
||||
}
|
||||
|
||||
wif = node.toWIF();
|
||||
pubKey = Format.uint8listToString(node.publicKey);
|
||||
wif = node.toWIF();
|
||||
pubKey = Format.uint8listToString(node.publicKey);
|
||||
}
|
||||
|
||||
if (wif == null || pubKey == null) {
|
||||
// fetch receiving derivations if null
|
||||
receiveDerivations[sd.derivePathType] ??= await _fetchDerivations(
|
||||
chain: 0,
|
||||
derivePathType: sd.derivePathType,
|
||||
);
|
||||
final receiveDerivation =
|
||||
receiveDerivations[sd.derivePathType]![sd.utxo.address!];
|
||||
|
||||
if (receiveDerivation != null) {
|
||||
pubKey = receiveDerivation["pubKey"] as String;
|
||||
wif = receiveDerivation["wif"] as String;
|
||||
} else {
|
||||
// fetch change derivations if null
|
||||
changeDerivations[sd.derivePathType] ??= await _fetchDerivations(
|
||||
chain: 1,
|
||||
derivePathType: sd.derivePathType,
|
||||
);
|
||||
final changeDerivation =
|
||||
changeDerivations[sd.derivePathType]![sd.utxo.address!];
|
||||
if (changeDerivation != null) {
|
||||
pubKey = changeDerivation["pubKey"] as String;
|
||||
wif = changeDerivation["wif"] as String;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -25,14 +25,18 @@ class PaynymIsApi {
|
|||
version +
|
||||
(endpoint.startsWith("/") ? endpoint : "/$endpoint");
|
||||
final uri = Uri.parse(url);
|
||||
final headers = {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
}..addAll(additionalHeaders);
|
||||
final response = await http.post(
|
||||
uri,
|
||||
headers: {
|
||||
'Content-Type': 'application/json; charset=UTF-8',
|
||||
}..addAll(additionalHeaders),
|
||||
headers: headers,
|
||||
body: jsonEncode(body),
|
||||
);
|
||||
|
||||
debugPrint("Paynym request uri: $uri");
|
||||
debugPrint("Paynym request body: $body");
|
||||
debugPrint("Paynym request headers: $headers");
|
||||
debugPrint("Paynym response code: ${response.statusCode}");
|
||||
debugPrint("Paynym response body: ${response.body}");
|
||||
|
||||
|
@ -543,24 +547,44 @@ class PaynymIsApi {
|
|||
// | 401 | Unauthorized token or signature or Unclaimed payment code |
|
||||
//
|
||||
// ------
|
||||
Future<PaynymResponse<bool>> add(
|
||||
String token,
|
||||
String signature,
|
||||
String nym,
|
||||
String code,
|
||||
) async {
|
||||
final result = await _post(
|
||||
"/nym/add",
|
||||
{
|
||||
"nym": nym,
|
||||
"code": code,
|
||||
"signature": signature,
|
||||
},
|
||||
{
|
||||
"auth-token": token,
|
||||
},
|
||||
);
|
||||
|
||||
// NOT USED
|
||||
// Future<Map<String, dynamic>> add(
|
||||
// String token,
|
||||
// String signature,
|
||||
// String nym,
|
||||
// String code,
|
||||
// ) async {
|
||||
// return _post(
|
||||
// "/add",
|
||||
// {
|
||||
// "nym": nym,
|
||||
// "code": code,
|
||||
// "signature": signature,
|
||||
// },
|
||||
// {
|
||||
// "auth-token": token,
|
||||
// },
|
||||
// );
|
||||
// }
|
||||
String message;
|
||||
bool value = false;
|
||||
|
||||
switch (result.item2) {
|
||||
case 200:
|
||||
message = "Code added successfully";
|
||||
value = true;
|
||||
break;
|
||||
case 400:
|
||||
message = "Bad request";
|
||||
break;
|
||||
case 401:
|
||||
message = "Unauthorized token or signature or Unclaimed payment code";
|
||||
break;
|
||||
case 404:
|
||||
message = "Nym not found";
|
||||
break;
|
||||
default:
|
||||
message = result.item1["message"] as String? ?? "Unknown error";
|
||||
}
|
||||
return PaynymResponse(value, result.item2, message);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -11,7 +11,6 @@ import 'package:stackwallet/providers/global/wallets_provider.dart';
|
|||
import 'package:stackwallet/providers/wallet/my_paynym_account_state_provider.dart';
|
||||
import 'package:stackwallet/services/mixins/paynym_wallet_interface.dart';
|
||||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/enums/derive_path_type_enum.dart';
|
||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/widgets/desktop/primary_button.dart';
|
||||
|
@ -68,8 +67,7 @@ class _PaynymFollowToggleButtonState
|
|||
.read(paynymAPIProvider)
|
||||
.nym(widget.paymentCodeStringToFollow, true);
|
||||
|
||||
final myPCode =
|
||||
await wallet.getPaymentCode(DerivePathTypeExt.primaryFor(manager.coin));
|
||||
final myPCode = await wallet.getPaymentCode(isSegwit: false);
|
||||
|
||||
PaynymResponse<String> token =
|
||||
await ref.read(paynymAPIProvider).token(myPCode.toString());
|
||||
|
@ -77,8 +75,8 @@ class _PaynymFollowToggleButtonState
|
|||
// sign token with notification private key
|
||||
String signature = await wallet.signStringWithNotificationKey(token.value!);
|
||||
|
||||
var result = await ref.read(paynymAPIProvider).follow(
|
||||
token.value!, signature, followedAccount.value!.codes.first.code);
|
||||
var result = await ref.read(paynymAPIProvider).follow(token.value!,
|
||||
signature, followedAccount.value!.nonSegwitPaymentCode.code);
|
||||
|
||||
int i = 0;
|
||||
for (;
|
||||
|
@ -90,8 +88,8 @@ class _PaynymFollowToggleButtonState
|
|||
// sign token with notification private key
|
||||
signature = await wallet.signStringWithNotificationKey(token.value!);
|
||||
|
||||
result = await ref.read(paynymAPIProvider).follow(
|
||||
token.value!, signature, followedAccount.value!.codes.first.code);
|
||||
result = await ref.read(paynymAPIProvider).follow(token.value!, signature,
|
||||
followedAccount.value!.nonSegwitPaymentCode.code);
|
||||
await Future<void>.delayed(const Duration(milliseconds: 200));
|
||||
|
||||
print("RRR result: $result");
|
||||
|
@ -118,8 +116,8 @@ class _PaynymFollowToggleButtonState
|
|||
PaynymAccountLite(
|
||||
followedAccount.value!.nymID,
|
||||
followedAccount.value!.nymName,
|
||||
followedAccount.value!.codes.first.code,
|
||||
followedAccount.value!.codes.first.segwit,
|
||||
followedAccount.value!.nonSegwitPaymentCode.code,
|
||||
followedAccount.value!.segwit,
|
||||
),
|
||||
);
|
||||
|
||||
|
@ -169,8 +167,7 @@ class _PaynymFollowToggleButtonState
|
|||
.read(paynymAPIProvider)
|
||||
.nym(widget.paymentCodeStringToFollow, true);
|
||||
|
||||
final myPCode =
|
||||
await wallet.getPaymentCode(DerivePathTypeExt.primaryFor(manager.coin));
|
||||
final myPCode = await wallet.getPaymentCode(isSegwit: false);
|
||||
|
||||
PaynymResponse<String> token =
|
||||
await ref.read(paynymAPIProvider).token(myPCode.toString());
|
||||
|
@ -178,8 +175,8 @@ class _PaynymFollowToggleButtonState
|
|||
// sign token with notification private key
|
||||
String signature = await wallet.signStringWithNotificationKey(token.value!);
|
||||
|
||||
var result = await ref.read(paynymAPIProvider).unfollow(
|
||||
token.value!, signature, followedAccount.value!.codes.first.code);
|
||||
var result = await ref.read(paynymAPIProvider).unfollow(token.value!,
|
||||
signature, followedAccount.value!.nonSegwitPaymentCode.code);
|
||||
|
||||
int i = 0;
|
||||
for (;
|
||||
|
@ -191,8 +188,8 @@ class _PaynymFollowToggleButtonState
|
|||
// sign token with notification private key
|
||||
signature = await wallet.signStringWithNotificationKey(token.value!);
|
||||
|
||||
result = await ref.read(paynymAPIProvider).unfollow(
|
||||
token.value!, signature, followedAccount.value!.codes.first.code);
|
||||
result = await ref.read(paynymAPIProvider).unfollow(token.value!,
|
||||
signature, followedAccount.value!.nonSegwitPaymentCode.code);
|
||||
await Future<void>.delayed(const Duration(milliseconds: 200));
|
||||
print("unfollow RRR result: $result");
|
||||
}
|
||||
|
|
|
@ -111,11 +111,11 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "48dd65f88822fba8543826274f6d51c17f735f93"
|
||||
resolved-ref: "48dd65f88822fba8543826274f6d51c17f735f93"
|
||||
ref: "38847255d035c0f6ec5bc93d19130ec804cf90e9"
|
||||
resolved-ref: "38847255d035c0f6ec5bc93d19130ec804cf90e9"
|
||||
url: "https://github.com/cypherstack/bip47.git"
|
||||
source: git
|
||||
version: "1.0.0"
|
||||
version: "2.0.0"
|
||||
bitbox:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -60,7 +60,7 @@ dependencies:
|
|||
bip47:
|
||||
git:
|
||||
url: https://github.com/cypherstack/bip47.git
|
||||
ref: 48dd65f88822fba8543826274f6d51c17f735f93
|
||||
ref: 38847255d035c0f6ec5bc93d19130ec804cf90e9
|
||||
|
||||
# Utility plugins
|
||||
# provider: ^6.0.1
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue