mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-16 17:27:39 +00:00
commit
2a38d5691e
42 changed files with 6716 additions and 102 deletions
9
.github/workflows/test.yaml
vendored
9
.github/workflows/test.yaml
vendored
|
@ -83,6 +83,12 @@ jobs:
|
|||
$secretFileNamecoinHash = Get-FileHash $secretFileNamecoin;
|
||||
Write-Output "Secret file $secretFileNamecoin has hash $($secretFileNamecoinHash.Hash)";
|
||||
|
||||
$secretFileParticl = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/particl/particl_wallet_test_parameters.dart";
|
||||
$encodedBytes = [System.Convert]::FromBase64String($env:PARTICL_TEST);
|
||||
Set-Content $secretFileParticl -Value $encodedBytes -AsByteStream;
|
||||
$secretFileParticlHash = Get-FileHash $secretFileParticl;
|
||||
Write-Output "Secret file $secretFileParticl has hash $($secretFileParticlHash.Hash)";
|
||||
|
||||
shell: pwsh
|
||||
env:
|
||||
CHANGE_NOW: ${{ secrets.CHANGE_NOW }}
|
||||
|
@ -91,6 +97,7 @@ jobs:
|
|||
FIRO_TEST: ${{ secrets.FIRO_TEST }}
|
||||
BITCOINCASH_TEST: ${{ secrets.BITCOINCASH_TEST }}
|
||||
NAMECOIN_TEST: ${{ secrets.NAMECOIN_TEST }}
|
||||
PARTICL_TEST: ${{ secrets.PARTICL_TEST }}
|
||||
# - name: Analyze
|
||||
# run: flutter analyze
|
||||
- name: Test
|
||||
|
@ -109,6 +116,7 @@ jobs:
|
|||
$secretFileFiro = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/firo/firo_wallet_test_parameters.dart";
|
||||
$secretFileBitcoinCash = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart";
|
||||
$secretFileNamecoin = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/namecoin/namecoin_wallet_test_parameters.dart";
|
||||
$secretFileParticl = Join-Path -Path $env:GITHUB_WORKSPACE -ChildPath "test/services/coins/particl/particl_wallet_test_parameters.dart";
|
||||
|
||||
Remove-Item -Path $secretFileExchange;
|
||||
Remove-Item -Path $secretFileBitcoin;
|
||||
|
@ -116,5 +124,6 @@ jobs:
|
|||
Remove-Item -Path $secretFileFiro;
|
||||
Remove-Item -Path $secretFileBitcoinCash;
|
||||
Remove-Item -Path $secretFileNamecoin;
|
||||
Remove-Item -Path $secretFileParticl;
|
||||
shell: pwsh
|
||||
if: always()
|
||||
|
|
4
.gitignore
vendored
4
.gitignore
vendored
|
@ -38,7 +38,9 @@ test/services/coins/bitcoin/bitcoin_wallet_test_parameters.dart
|
|||
test/services/coins/firo/firo_wallet_test_parameters.dart
|
||||
test/services/coins/dogecoin/dogecoin_wallet_test_parameters.dart
|
||||
test/services/coins/namecoin/namecoin_wallet_test_parameters.dart
|
||||
test/services/coins/namecoin/namecoin_wallet_test_parameters.dart.txt # Legacy
|
||||
test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart
|
||||
test/services/coins/particl/particl_wallet_test_parameters.dart
|
||||
/integration_test/private.dart
|
||||
|
||||
# Exceptions to above rules.
|
||||
|
@ -48,5 +50,3 @@ test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart
|
|||
coverage
|
||||
scripts/**/build
|
||||
/lib/external_api_keys.dart
|
||||
/test/services/coins/bitcoincash/bitcoincash_wallet_test_parameters.dart
|
||||
/test/services/coins/namecoin/namecoin_wallet_test_parameters.dart.txt
|
||||
|
|
BIN
assets/images/particl.png
Normal file
BIN
assets/images/particl.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 335 KiB |
1
assets/svg/coin_icons/Particl.svg
Normal file
1
assets/svg/coin_icons/Particl.svg
Normal file
|
@ -0,0 +1 @@
|
|||
<svg id="Particl_-_logo_white_text" data-name="Particl - logo white text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 228.62 228.33"><title>particl-part-logo</title><path d="M227.64,47.53a57.36,57.36,0,0,0-20.55-34.84A56.67,56.67,0,0,0,171.31,0Q113.76,0,56.16,0c-20,.23-39,11.82-48.7,29.24C2,38.62,0,49.13,0,59.85q0,52.43,0,104.88c-.07,8.13.29,15.94,2.83,23.74A58,58,0,0,0,42,226.26c-5.51-4.39-7.95-10.5-9.74-17.11-3.71-14.5-4-29.56-3.4-44.42-.06-35,0-69.93,0-104.88.05-6,.5-11.67,3.58-17a27.31,27.31,0,0,1,23.79-14q54.71,0,109.45,0c5.51,0,10.52-.4,15.78,1.59A27.2,27.2,0,0,1,199,50.14c1.08,5.29.79,11.16.81,16.55v102.6c0,5-.56,10-2.73,14.57-4.47,9.35-14.14,15.84-24.61,15.65-28.87,0-57.77,0-86.63,0-.06-9.41,0-18.82,0-28.24q35.36,0,70.69,0c5.07.28,10.91-2.29,13.24-7a15.68,15.68,0,0,0,1.6-7.58q0-42.78,0-85.53a13.21,13.21,0,0,0-7-12.5c-3.9-2.26-8.07-1.68-12.42-1.76-27,.07-54,0-80.94.05A13.87,13.87,0,0,0,57.08,71.24c-.11,41,0,82.15,0,123.14.21,8.14-.05,15.85,4.67,22.9,3.58,5.82,9.63,8.78,16.14,10.07,7.7,1.24,15.06.94,22.79,1q35.36,0,70.68,0A57.17,57.17,0,0,0,204.07,218c10.32-7.61,18.32-18.09,22-30.45,2.54-8.36,2.5-16.48,2.54-25.11q0-49,0-98A114.68,114.68,0,0,0,227.64,47.53Zm-85.28,95H85.83V85.77h56.53Z" style="fill:#45d492"/></svg>
|
After Width: | Height: | Size: 1.2 KiB |
|
@ -380,19 +380,45 @@ class Output {
|
|||
|
||||
factory Output.fromJson(Map<String, dynamic> json) {
|
||||
// TODO determine if any of this code is needed.
|
||||
final address = json["scriptPubKey"]["addresses"] == null
|
||||
? json['scriptPubKey']['type'] as String
|
||||
: json["scriptPubKey"]["addresses"][0] as String;
|
||||
return Output(
|
||||
scriptpubkey: json['scriptPubKey']['hex'] as String?,
|
||||
scriptpubkeyAsm: json['scriptPubKey']['asm'] as String?,
|
||||
scriptpubkeyType: json['scriptPubKey']['type'] as String?,
|
||||
scriptpubkeyAddress: address,
|
||||
value: (Decimal.parse(json["value"].toString()) *
|
||||
Decimal.fromInt(Constants.satsPerCoin(Coin
|
||||
.firo))) // dirty hack but we need 8 decimal places here to keep consistent data structure
|
||||
.toBigInt()
|
||||
.toInt(),
|
||||
);
|
||||
// Particl has different tx types that need to be detected and handled here
|
||||
if (json.containsKey('scriptPubKey') as bool) {
|
||||
// output is transparent
|
||||
final address = json["scriptPubKey"]["addresses"] == null
|
||||
? json['scriptPubKey']['type'] as String
|
||||
: json["scriptPubKey"]["addresses"][0] as String;
|
||||
return Output(
|
||||
scriptpubkey: json['scriptPubKey']['hex'] as String?,
|
||||
scriptpubkeyAsm: json['scriptPubKey']['asm'] as String?,
|
||||
scriptpubkeyType: json['scriptPubKey']['type'] as String?,
|
||||
scriptpubkeyAddress: address,
|
||||
value: (Decimal.parse(json["value"].toString()) *
|
||||
Decimal.fromInt(Constants.satsPerCoin(Coin
|
||||
.firo))) // dirty hack but we need 8 decimal places here to keep consistent data structure
|
||||
.toBigInt()
|
||||
.toInt(),
|
||||
);
|
||||
} /* else if (json.containsKey('ct_fee') as bool) {
|
||||
// or type: data
|
||||
// output is blinded (CT)
|
||||
} else if (json.containsKey('rangeproof') as bool) {
|
||||
// or valueCommitment or type: anon
|
||||
// output is private (RingCT)
|
||||
} */
|
||||
else {
|
||||
// TODO detect staking
|
||||
// TODO handle CT, RingCT, and staking accordingly
|
||||
// print("transaction not supported: ${json}");
|
||||
return Output(
|
||||
// Return output object with null values; allows wallet history to be built
|
||||
scriptpubkey: "",
|
||||
scriptpubkeyAsm: "",
|
||||
scriptpubkeyType: "",
|
||||
scriptpubkeyAddress: "",
|
||||
value: (Decimal.parse(0.toString()) *
|
||||
Decimal.fromInt(Constants.satsPerCoin(Coin
|
||||
.firo))) // dirty hack but we need 8 decimal places here to keep consistent data structure
|
||||
.toBigInt()
|
||||
.toInt());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -135,6 +135,7 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
|
|||
case Coin.dogecoin:
|
||||
case Coin.firo:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
case Coin.bitcoinTestNet:
|
||||
case Coin.litecoinTestNet:
|
||||
case Coin.bitcoincashTestnet:
|
||||
|
@ -681,6 +682,7 @@ class _NodeFormState extends ConsumerState<NodeForm> {
|
|||
case Coin.firo:
|
||||
case Coin.namecoin:
|
||||
case Coin.bitcoincash:
|
||||
case Coin.particl:
|
||||
case Coin.bitcoinTestNet:
|
||||
case Coin.litecoinTestNet:
|
||||
case Coin.bitcoincashTestnet:
|
||||
|
|
|
@ -10,6 +10,7 @@ import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart';
|
|||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/monero/monero_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/particl/particl_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart';
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
|
@ -181,6 +182,16 @@ abstract class CoinServiceAPI {
|
|||
// tracker: tracker,
|
||||
);
|
||||
|
||||
case Coin.particl:
|
||||
return ParticlWallet(
|
||||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
coin: coin,
|
||||
secureStore: secureStorageInterface,
|
||||
client: client,
|
||||
cachedClient: cachedClient,
|
||||
tracker: tracker);
|
||||
|
||||
case Coin.wownero:
|
||||
return WowneroWallet(
|
||||
walletId: walletId,
|
||||
|
|
3538
lib/services/coins/particl/particl_wallet.dart
Normal file
3538
lib/services/coins/particl/particl_wallet.dart
Normal file
File diff suppressed because it is too large
Load diff
|
@ -87,7 +87,7 @@ class PriceAPI {
|
|||
Map<Coin, Tuple2<Decimal, double>> result = {};
|
||||
try {
|
||||
final uri = Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
||||
// final uri = Uri.parse(
|
||||
// "https://api.coingecko.com/api/v3/coins/markets?vs_currency=${baseCurrency.toLowerCase()}&ids=monero%2Cbitcoin%2Cepic-cash%2Czcoin%2Cdogecoin&order=market_cap_desc&per_page=10&page=1&sparkline=false");
|
||||
|
||||
|
|
|
@ -8,6 +8,7 @@ import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
|
|||
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/litecoin/litecoin_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
|
||||
import 'package:stackwallet/services/coins/particl/particl_wallet.dart';
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
|
||||
|
@ -61,6 +62,8 @@ class AddressUtils {
|
|||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
|
||||
case Coin.namecoin:
|
||||
return Address.validateAddress(address, namecoin, namecoin.bech32!);
|
||||
case Coin.particl:
|
||||
return Address.validateAddress(address, particl);
|
||||
case Coin.bitcoinTestNet:
|
||||
return Address.validateAddress(address, testnet);
|
||||
case Coin.litecoinTestNet:
|
||||
|
|
|
@ -180,6 +180,7 @@ class _SVG {
|
|||
String get monero => "assets/svg/coin_icons/Monero.svg";
|
||||
String get wownero => "assets/svg/coin_icons/Wownero.svg";
|
||||
String get namecoin => "assets/svg/coin_icons/Namecoin.svg";
|
||||
String get particl => "assets/svg/coin_icons/Particl.svg";
|
||||
|
||||
String get chevronRight => "assets/svg/chevron-right.svg";
|
||||
String get minimize => "assets/svg/minimize.svg";
|
||||
|
@ -192,6 +193,8 @@ class _SVG {
|
|||
String get bitcoincashTestnet => "assets/svg/coin_icons/Bitcoincash.svg";
|
||||
String get firoTestnet => "assets/svg/coin_icons/Firo.svg";
|
||||
String get dogecoinTestnet => "assets/svg/coin_icons/Dogecoin.svg";
|
||||
String get particlTestnet =>
|
||||
"assets/svg/coin_icons/Dogecoin.svg"; //TODO - Update icon to particl
|
||||
|
||||
String iconFor({required Coin coin}) {
|
||||
switch (coin) {
|
||||
|
@ -214,6 +217,8 @@ class _SVG {
|
|||
return wownero;
|
||||
case Coin.namecoin:
|
||||
return namecoin;
|
||||
case Coin.particl:
|
||||
return particl;
|
||||
case Coin.bitcoinTestNet:
|
||||
return bitcoinTestnet;
|
||||
case Coin.bitcoincashTestnet:
|
||||
|
@ -241,6 +246,7 @@ class _PNG {
|
|||
String get epicCash => "assets/images/epic-cash.png";
|
||||
String get bitcoincash => "assets/images/bitcoincash.png";
|
||||
String get namecoin => "assets/images/namecoin.png";
|
||||
String get particl => "assets/images/particl.png";
|
||||
|
||||
String get glasses => "assets/images/glasses.png";
|
||||
String get glassesHidden => "assets/images/glasses-hidden.png";
|
||||
|
@ -271,6 +277,8 @@ class _PNG {
|
|||
return wownero;
|
||||
case Coin.namecoin:
|
||||
return namecoin;
|
||||
case Coin.particl:
|
||||
return particl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,5 +35,7 @@ Uri getBlockExplorerTransactionUrlFor({
|
|||
"https://blockexplorer.one/bitcoin-cash/testnet/tx/$txid");
|
||||
case Coin.namecoin:
|
||||
return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
|
||||
case Coin.particl:
|
||||
return Uri.parse("https://chainz.cryptoid.info/part/tx.dws?$txid.htm");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,6 +54,7 @@ abstract class Constants {
|
|||
case Coin.firoTestNet:
|
||||
case Coin.epicCash:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
return _satsPerCoin;
|
||||
|
||||
case Coin.wownero:
|
||||
|
@ -78,6 +79,7 @@ abstract class Constants {
|
|||
case Coin.firoTestNet:
|
||||
case Coin.epicCash:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
return _decimalPlaces;
|
||||
|
||||
case Coin.wownero:
|
||||
|
@ -103,6 +105,7 @@ abstract class Constants {
|
|||
case Coin.firoTestNet:
|
||||
case Coin.epicCash:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
values.addAll([24, 21, 18, 15, 12]);
|
||||
break;
|
||||
|
||||
|
@ -150,6 +153,9 @@ abstract class Constants {
|
|||
|
||||
case Coin.namecoin:
|
||||
return 600;
|
||||
|
||||
case Coin.particl:
|
||||
return 600;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -18,6 +18,7 @@ abstract class DefaultNodes {
|
|||
bitcoincash,
|
||||
namecoin,
|
||||
wownero,
|
||||
particl,
|
||||
bitcoinTestnet,
|
||||
litecoinTestNet,
|
||||
bitcoincashTestnet,
|
||||
|
@ -145,6 +146,17 @@ abstract class DefaultNodes {
|
|||
isDown: false,
|
||||
);
|
||||
|
||||
static NodeModel get particl => NodeModel(
|
||||
host: "particl.stackwallet.com",
|
||||
port: 58002,
|
||||
name: defaultName,
|
||||
id: _nodeId(Coin.particl),
|
||||
useSSL: true,
|
||||
enabled: true,
|
||||
coinName: Coin.particl.name,
|
||||
isFailover: true,
|
||||
isDown: false);
|
||||
|
||||
static NodeModel get bitcoinTestnet => NodeModel(
|
||||
host: "electrumx-testnet.cypherstack.com",
|
||||
port: 51002,
|
||||
|
@ -222,6 +234,9 @@ abstract class DefaultNodes {
|
|||
case Coin.namecoin:
|
||||
return namecoin;
|
||||
|
||||
case Coin.particl:
|
||||
return particl;
|
||||
|
||||
case Coin.bitcoinTestNet:
|
||||
return bitcoinTestnet;
|
||||
|
||||
|
|
|
@ -12,7 +12,11 @@ import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
|
|||
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart'
|
||||
as nmc;
|
||||
import 'package:stackwallet/services/coins/wownero/wownero_wallet.dart' as wow;
|
||||
import 'package:stackwallet/services/coins/particl/particl_wallet.dart'
|
||||
as particl;
|
||||
import 'package:stackwallet/utilities/util.dart';
|
||||
import 'package:stackwallet/services/coins/particl/particl_wallet.dart'
|
||||
as particl;
|
||||
|
||||
enum Coin {
|
||||
bitcoin,
|
||||
|
@ -23,6 +27,7 @@ enum Coin {
|
|||
litecoin,
|
||||
monero,
|
||||
namecoin,
|
||||
particl,
|
||||
wownero,
|
||||
|
||||
///
|
||||
|
@ -56,6 +61,8 @@ extension CoinExt on Coin {
|
|||
return "Firo";
|
||||
case Coin.monero:
|
||||
return "Monero";
|
||||
case Coin.particl:
|
||||
return "Particl";
|
||||
case Coin.wownero:
|
||||
return "Wownero";
|
||||
case Coin.namecoin:
|
||||
|
@ -89,6 +96,8 @@ extension CoinExt on Coin {
|
|||
return "FIRO";
|
||||
case Coin.monero:
|
||||
return "XMR";
|
||||
case Coin.particl:
|
||||
return "PART";
|
||||
case Coin.wownero:
|
||||
return "WOW";
|
||||
case Coin.namecoin:
|
||||
|
@ -123,6 +132,8 @@ extension CoinExt on Coin {
|
|||
return "firo";
|
||||
case Coin.monero:
|
||||
return "monero";
|
||||
case Coin.particl:
|
||||
return "particl";
|
||||
case Coin.wownero:
|
||||
return "wownero";
|
||||
case Coin.namecoin:
|
||||
|
@ -148,6 +159,7 @@ extension CoinExt on Coin {
|
|||
case Coin.dogecoin:
|
||||
case Coin.firo:
|
||||
case Coin.namecoin:
|
||||
case Coin.particl:
|
||||
case Coin.bitcoinTestNet:
|
||||
case Coin.litecoinTestNet:
|
||||
case Coin.bitcoincashTestnet:
|
||||
|
@ -190,6 +202,9 @@ extension CoinExt on Coin {
|
|||
case Coin.monero:
|
||||
return xmr.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
case Coin.particl:
|
||||
return particl.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
case Coin.wownero:
|
||||
return wow.MINIMUM_CONFIRMATIONS;
|
||||
|
||||
|
@ -230,6 +245,10 @@ Coin coinFromPrettyName(String name) {
|
|||
case "monero":
|
||||
return Coin.monero;
|
||||
|
||||
case "Particl":
|
||||
case "particl":
|
||||
return Coin.particl;
|
||||
|
||||
case "Namecoin":
|
||||
case "namecoin":
|
||||
return Coin.namecoin;
|
||||
|
@ -293,8 +312,12 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
|
|||
return Coin.monero;
|
||||
case "nmc":
|
||||
return Coin.namecoin;
|
||||
case "part":
|
||||
return Coin.particl;
|
||||
case "tltc":
|
||||
return Coin.litecoinTestNet;
|
||||
case "part":
|
||||
return Coin.particl;
|
||||
case "tbtc":
|
||||
return Coin.bitcoinTestNet;
|
||||
case "tbch":
|
||||
|
|
|
@ -220,6 +220,7 @@ class CoinThemeColor {
|
|||
Color get monero => const Color(0xFFFF9E6B);
|
||||
Color get namecoin => const Color(0xFF91B1E1);
|
||||
Color get wownero => const Color(0xFFED80C1);
|
||||
Color get particl => const Color(0xFF8175BD);
|
||||
|
||||
Color forCoin(Coin coin) {
|
||||
switch (coin) {
|
||||
|
@ -246,6 +247,8 @@ class CoinThemeColor {
|
|||
return namecoin;
|
||||
case Coin.wownero:
|
||||
return wownero;
|
||||
case Coin.particl:
|
||||
return particl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1443,6 +1443,8 @@ class StackColors extends ThemeExtension<StackColors> {
|
|||
return _coin.namecoin;
|
||||
case Coin.wownero:
|
||||
return _coin.wownero;
|
||||
case Coin.particl:
|
||||
return _coin.particl;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
66
pubspec.lock
66
pubspec.lock
|
@ -56,7 +56,7 @@ packages:
|
|||
name: asn1lib
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.0"
|
||||
version: "1.4.0"
|
||||
async:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -109,8 +109,8 @@ packages:
|
|||
dependency: "direct main"
|
||||
description:
|
||||
path: "."
|
||||
ref: "65eb920719c8f7895c5402a07497647e7fc4b346"
|
||||
resolved-ref: "65eb920719c8f7895c5402a07497647e7fc4b346"
|
||||
ref: "004d6f82dff7389b561e5078b4649adcd2d9c10f"
|
||||
resolved-ref: "004d6f82dff7389b561e5078b4649adcd2d9c10f"
|
||||
url: "https://github.com/cypherstack/bitcoindart.git"
|
||||
source: git
|
||||
version: "3.0.1"
|
||||
|
@ -169,7 +169,7 @@ packages:
|
|||
name: build_runner_core
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "7.2.6"
|
||||
version: "7.2.7"
|
||||
built_collection:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -183,7 +183,7 @@ packages:
|
|||
name: built_value
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "8.4.1"
|
||||
version: "8.4.2"
|
||||
characters:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -253,7 +253,7 @@ packages:
|
|||
name: connectivity_plus_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.2.2"
|
||||
version: "1.2.3"
|
||||
connectivity_plus_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -372,7 +372,7 @@ packages:
|
|||
name: decimal
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.3.0"
|
||||
version: "2.3.2"
|
||||
dependency_validator:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -456,7 +456,7 @@ packages:
|
|||
name: file_picker
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "5.2.1"
|
||||
version: "5.2.3"
|
||||
fixnum:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -543,7 +543,7 @@ packages:
|
|||
name: flutter_mobx
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.6+4"
|
||||
version: "2.0.6+5"
|
||||
flutter_native_splash:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -585,35 +585,35 @@ packages:
|
|||
name: flutter_secure_storage_linux
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
flutter_secure_storage_macos:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_macos
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.1"
|
||||
version: "1.1.2"
|
||||
flutter_secure_storage_platform_interface:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.0"
|
||||
version: "1.0.1"
|
||||
flutter_secure_storage_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_web
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.1.1"
|
||||
flutter_secure_storage_windows:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: flutter_secure_storage_windows
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.2"
|
||||
version: "1.1.3"
|
||||
flutter_spinkit:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -627,7 +627,7 @@ packages:
|
|||
name: flutter_svg
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.1.5"
|
||||
version: "1.1.6"
|
||||
flutter_test:
|
||||
dependency: "direct dev"
|
||||
description: flutter
|
||||
|
@ -670,7 +670,7 @@ packages:
|
|||
name: graphs
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.0"
|
||||
version: "2.2.0"
|
||||
hex:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -712,7 +712,7 @@ packages:
|
|||
name: html
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.15.0"
|
||||
version: "0.15.1"
|
||||
http:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -836,7 +836,7 @@ packages:
|
|||
name: lints
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.0"
|
||||
version: "2.0.1"
|
||||
local_auth:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -885,14 +885,14 @@ packages:
|
|||
name: mime
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.3"
|
||||
mobx:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: mobx
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.1"
|
||||
version: "2.1.3"
|
||||
mockingjay:
|
||||
dependency: "direct dev"
|
||||
description:
|
||||
|
@ -920,7 +920,7 @@ packages:
|
|||
name: mutex
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.0"
|
||||
version: "3.0.1"
|
||||
nm:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1018,7 +1018,7 @@ packages:
|
|||
name: path_provider_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.20"
|
||||
version: "2.0.22"
|
||||
path_provider_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1060,7 +1060,7 @@ packages:
|
|||
name: permission_handler
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "10.1.0"
|
||||
version: "10.2.0"
|
||||
permission_handler_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1144,7 +1144,7 @@ packages:
|
|||
name: pub_semver
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.1.2"
|
||||
version: "2.1.3"
|
||||
pubspec_parse:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1172,7 +1172,7 @@ packages:
|
|||
name: rational
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.2.0"
|
||||
version: "2.2.2"
|
||||
riverpod:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1200,7 +1200,7 @@ packages:
|
|||
name: rxdart
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "0.27.5"
|
||||
version: "0.27.7"
|
||||
share_plus:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
@ -1228,7 +1228,7 @@ packages:
|
|||
name: share_plus_platform_interface
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.1.1"
|
||||
version: "3.2.0"
|
||||
share_plus_web:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1326,7 +1326,7 @@ packages:
|
|||
name: shelf_web_socket
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "1.0.2"
|
||||
version: "1.0.3"
|
||||
sky_engine:
|
||||
dependency: transitive
|
||||
description: flutter
|
||||
|
@ -1403,7 +1403,7 @@ packages:
|
|||
name: stream_transform
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "2.0.1"
|
||||
version: "2.1.0"
|
||||
string_scanner:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1515,14 +1515,14 @@ packages:
|
|||
name: url_launcher
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.1.6"
|
||||
version: "6.1.7"
|
||||
url_launcher_android:
|
||||
dependency: transitive
|
||||
description:
|
||||
name: url_launcher_android
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "6.0.19"
|
||||
version: "6.0.22"
|
||||
url_launcher_ios:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1571,7 +1571,7 @@ packages:
|
|||
name: uuid
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.6"
|
||||
version: "3.0.7"
|
||||
vector_math:
|
||||
dependency: transitive
|
||||
description:
|
||||
|
@ -1655,7 +1655,7 @@ packages:
|
|||
name: win32
|
||||
url: "https://pub.dartlang.org"
|
||||
source: hosted
|
||||
version: "3.0.1"
|
||||
version: "3.1.2"
|
||||
window_size:
|
||||
dependency: "direct main"
|
||||
description:
|
||||
|
|
|
@ -49,7 +49,7 @@ dependencies:
|
|||
bitcoindart:
|
||||
git:
|
||||
url: https://github.com/cypherstack/bitcoindart.git
|
||||
ref: 65eb920719c8f7895c5402a07497647e7fc4b346
|
||||
ref: 004d6f82dff7389b561e5078b4649adcd2d9c10f
|
||||
|
||||
stack_wallet_backup:
|
||||
git:
|
||||
|
@ -209,6 +209,7 @@ flutter:
|
|||
- assets/images/epic-cash.png
|
||||
- assets/images/bitcoincash.png
|
||||
- assets/images/namecoin.png
|
||||
- assets/images/particl.png
|
||||
- assets/images/glasses.png
|
||||
- assets/images/glasses-hidden.png
|
||||
- assets/svg/plus.svg
|
||||
|
@ -310,6 +311,7 @@ flutter:
|
|||
- assets/svg/coin_icons/Monero.svg
|
||||
- assets/svg/coin_icons/Wownero.svg
|
||||
- assets/svg/coin_icons/Namecoin.svg
|
||||
- assets/svg/coin_icons/Particl.svg
|
||||
# lottie animations
|
||||
- assets/lottie/test.json
|
||||
- assets/lottie/test2.json
|
||||
|
|
|
@ -2,5 +2,17 @@
|
|||
KEYS=../lib/external_api_keys.dart
|
||||
if ! test -f "$KEYS"; then
|
||||
echo 'prebuild.sh: creating template lib/external_api_keys.dart file'
|
||||
printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";' > $KEYS
|
||||
printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";\n' > $KEYS
|
||||
fi
|
||||
|
||||
# Create template wallet test parameter files if they don't already exist
|
||||
declare -a coins=("bitcoin" "bitcoincash" "dogecoin" "namecoin" "firo" "particl") # TODO add monero and wownero when those tests are updated to use the .gitignored test wallet setup: when doing that, make sure to update the test vectors for a new, private development seed
|
||||
|
||||
for coin in "${coins[@]}"
|
||||
do
|
||||
WALLETTESTPARAMFILE="../test/services/coins/${coin}/${coin}_wallet_test_parameters.dart"
|
||||
if ! test -f "$WALLETTESTPARAMFILE"; then
|
||||
echo "prebuild.sh: creating template test/services/coins/${coin}/${coin}_wallet_test_parameters.dart file"
|
||||
printf 'const TEST_MNEMONIC = "";\nconst ROOT_WIF = "";\nconst NODE_WIF_84 = "";\n' > $WALLETTESTPARAMFILE
|
||||
fi
|
||||
done
|
||||
|
|
|
@ -551,6 +551,19 @@ class MockPrefs extends _i1.Mock implements _i5.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
|
|
@ -272,6 +272,19 @@ class MockPrefs extends _i1.Mock implements _i4.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
|
|
@ -85,9 +85,9 @@ class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager {
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_4 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_4 extends _i1.SmartFake
|
||||
implements _i7.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_4(
|
||||
_FakeSecureStorageInterface_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -623,7 +623,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_4(
|
||||
returnValue: _FakeSecureStorageInterface_4(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
@ -1765,6 +1765,19 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
|
|
@ -26,7 +26,7 @@ void main() {
|
|||
|
||||
when(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
})).thenAnswer((_) async => Response(
|
||||
|
@ -39,10 +39,10 @@ void main() {
|
|||
final price = await priceAPI.getPricesAnd24hChange(baseCurrency: "btc");
|
||||
|
||||
expect(price.toString(),
|
||||
'{Coin.bitcoin: [1, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0.00000315, -2.68533], Coin.epicCash: [0.00002803, 7.27524], Coin.firo: [0.0001096, -0.89304], Coin.litecoin: [0, 0.0], Coin.monero: [0.00717236, -0.77656], Coin.namecoin: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
'{Coin.bitcoin: [1, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0.00000315, -2.68533], Coin.epicCash: [0.00002803, 7.27524], Coin.firo: [0.0001096, -0.89304], Coin.litecoin: [0, 0.0], Coin.monero: [0.00717236, -0.77656], Coin.namecoin: [0, 0.0], Coin.particl: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
verify(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {'Content-Type': 'application/json'})).called(1);
|
||||
|
||||
verifyNoMoreInteractions(client);
|
||||
|
@ -53,7 +53,7 @@ void main() {
|
|||
|
||||
when(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
})).thenAnswer((_) async => Response(
|
||||
|
@ -71,12 +71,12 @@ void main() {
|
|||
await priceAPI.getPricesAnd24hChange(baseCurrency: "btc");
|
||||
|
||||
expect(cachedPrice.toString(),
|
||||
'{Coin.bitcoin: [1, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0.00000315, -2.68533], Coin.epicCash: [0.00002803, 7.27524], Coin.firo: [0.0001096, -0.89304], Coin.litecoin: [0, 0.0], Coin.monero: [0.00717236, -0.77656], Coin.namecoin: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
'{Coin.bitcoin: [1, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0.00000315, -2.68533], Coin.epicCash: [0.00002803, 7.27524], Coin.firo: [0.0001096, -0.89304], Coin.litecoin: [0, 0.0], Coin.monero: [0.00717236, -0.77656], Coin.namecoin: [0, 0.0], Coin.particl: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
|
||||
// verify only called once during filling of cache
|
||||
verify(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {'Content-Type': 'application/json'})).called(1);
|
||||
|
||||
verifyNoMoreInteractions(client);
|
||||
|
@ -87,7 +87,7 @@ void main() {
|
|||
|
||||
when(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
})).thenAnswer((_) async => Response(
|
||||
|
@ -100,7 +100,7 @@ void main() {
|
|||
final price = await priceAPI.getPricesAnd24hChange(baseCurrency: "btc");
|
||||
|
||||
expect(price.toString(),
|
||||
'{Coin.bitcoin: [0, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0, 0.0], Coin.epicCash: [0, 0.0], Coin.firo: [0, 0.0], Coin.litecoin: [0, 0.0], Coin.monero: [0, 0.0], Coin.namecoin: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
'{Coin.bitcoin: [0, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0, 0.0], Coin.epicCash: [0, 0.0], Coin.firo: [0, 0.0], Coin.litecoin: [0, 0.0], Coin.monero: [0, 0.0], Coin.namecoin: [0, 0.0], Coin.particl: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
});
|
||||
|
||||
test("no internet available", () async {
|
||||
|
@ -108,7 +108,7 @@ void main() {
|
|||
|
||||
when(client.get(
|
||||
Uri.parse(
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
"https://api.coingecko.com/api/v3/coins/markets?vs_currency=btc&ids=monero,bitcoin,litecoin,epic-cash,zcoin,dogecoin,bitcoin-cash,namecoin,wownero,particl&order=market_cap_desc&per_page=10&page=1&sparkline=false"),
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
})).thenThrow(const SocketException(
|
||||
|
@ -120,7 +120,7 @@ void main() {
|
|||
final price = await priceAPI.getPricesAnd24hChange(baseCurrency: "btc");
|
||||
|
||||
expect(price.toString(),
|
||||
'{Coin.bitcoin: [0, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0, 0.0], Coin.epicCash: [0, 0.0], Coin.firo: [0, 0.0], Coin.litecoin: [0, 0.0], Coin.monero: [0, 0.0], Coin.namecoin: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
'{Coin.bitcoin: [0, 0.0], Coin.bitcoincash: [0, 0.0], Coin.dogecoin: [0, 0.0], Coin.epicCash: [0, 0.0], Coin.firo: [0, 0.0], Coin.litecoin: [0, 0.0], Coin.monero: [0, 0.0], Coin.namecoin: [0, 0.0], Coin.particl: [0, 0.0], Coin.wownero: [0, 0.0], Coin.bitcoinTestNet: [0, 0.0], Coin.litecoinTestNet: [0, 0.0], Coin.bitcoincashTestnet: [0, 0.0], Coin.dogecoinTestNet: [0, 0.0], Coin.firoTestNet: [0, 0.0]}');
|
||||
});
|
||||
|
||||
tearDown(() async {
|
||||
|
|
|
@ -223,6 +223,19 @@ class MockPrefs extends _i1.Mock implements _i3.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
|
|
@ -29,9 +29,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -311,7 +311,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -29,9 +29,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -311,7 +311,7 @@ class MockNodeService extends _i1.Mock implements _i10.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -83,9 +83,9 @@ class _FakeTransactionData_4 extends _i1.SmartFake
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_5 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_5 extends _i1.SmartFake
|
||||
implements _i6.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_5(
|
||||
_FakeSecureStorageInterface_5(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -744,10 +744,9 @@ class MockManager extends _i1.Mock implements _i12.Manager {
|
|||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockNodeService extends _i1.Mock implements _i13.NodeService {
|
||||
@override
|
||||
_i6.SecureStorageInterface get secureStorageInterface =>
|
||||
(super.noSuchMethod(
|
||||
_i6.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_5(
|
||||
returnValue: _FakeSecureStorageInterface_5(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -28,9 +28,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -88,7 +88,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -28,9 +28,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -88,7 +88,7 @@ class MockNodeService extends _i1.Mock implements _i6.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -24,9 +24,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -42,7 +42,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
152
test/services/coins/particl/particl_history_sample_data.dart
Normal file
152
test/services/coins/particl/particl_history_sample_data.dart
Normal file
|
@ -0,0 +1,152 @@
|
|||
final Map<String, List<dynamic>> historyBatchArgs0 = {
|
||||
"k_0_0": ["a48f8ee5dc6ff58b29eddeac1afd808b2edff10d736bdede3a2e6a95e588911c"],
|
||||
"k_0_1": ["b6fce6c41154ccf70676c5c91acd9b6899ef0195e34b4c05c4920daa827c19a3"],
|
||||
"k_0_2": ["aabdda195909a16141e8a3ab548fc5e8e8ba483762f94e1571cf93572bc6767e"],
|
||||
"k_0_3": ["17ffed6bf6a9960b696139b6c40a1e4f2ee214a68442abdf57e9040079e62765"],
|
||||
"k_0_4": ["25b58fdb4a8ea949730e138bddf6ff90c13d09123ba935efefc6f5d0e085885e"],
|
||||
"k_0_5": ["952c7c54ad41bca032fa752d00a8d07e8ea5ae3e850266b45110bbc2a8969c43"],
|
||||
"k_0_6": ["6b9a3a156ca83f20533ddc29c84cd1872fce4b612f738f022028ad680b77aaa3"],
|
||||
"k_0_7": ["b6f0f12cc91bbb21584668146c2bfa7d07a786b8772fdd43e6daba3ff43aadff"],
|
||||
"k_0_8": ["d478d5ca5e92e3a98c36136bf9712f981e7b1cb93ebe65e25f1e11151047a753"],
|
||||
"k_0_9": ["f3bfe232ca898d1cb44c23586323b0fedef477208c8b4f203eebdf9ea8a2ceef"],
|
||||
"k_0_10": [
|
||||
"aedac6f5e8f0e96c7a53d9b0460ba9e9397efbd9d15c46a28d7b0be70ffc6dac"
|
||||
],
|
||||
"k_0_11": ["f66b687065339e2d4d567f9ea473947b8aab74c066bf00cdfdb5f918bbd159dc"]
|
||||
};
|
||||
|
||||
final Map<String, List<dynamic>> historyBatchArgs1 = {
|
||||
"k_0_0": ["0664a4e19dd852c7d6fb53824198070e911dae9049aa9a6a940413cb868bbb27"],
|
||||
"k_0_1": ["c4b1d9cd4edb7c13eae863b1e4f8fd5acff29f1fe153c4f859906cbea26a3f2f"],
|
||||
"k_0_2": ["aa34a5cd34908ed90f41ce31058552bee864b8894eec3b5b3f2583eb56eca759"],
|
||||
"k_0_3": ["996cca35eb2c30699c8b28d3fff12a8fb7fbbacfbfe4aafc4e59833134cb37bb"],
|
||||
"k_0_4": ["f581a49f492a0d2bc18b5c82ef999f03ff795bf5101646bed871b3efa1f34578"],
|
||||
"k_0_5": ["ce5fe035e2ce47a7d5d1dc65ad4fc2d40d621f0f2fa25eb233e6d717e0b1743a"],
|
||||
"k_0_6": ["51031f3710836824b48df2f33d1daa2c63b397c3c604577f09c8b4bef19302fb"],
|
||||
"k_0_7": ["901f355de67d762c5a768ef19624359c8f95bc9f70d381507727a885cb46964b"],
|
||||
"k_0_8": ["8ac9526d63526f498fc7c609adcb72c23a403cc271c91408288c19318357f059"],
|
||||
"k_0_9": ["ca7b62c4b069ff2d4fcbc0faac32447b92d519dd726039eb7381ca5fde176e97"],
|
||||
"k_0_10": [
|
||||
"f07285fe3a8eac625b2c5339cf9f068fccb2278f923a38a46a60c94c7179d4aa"
|
||||
],
|
||||
"k_0_11": ["f8f09b8fe23da8435409c3e688002dcaa87c2b9f3707e17bc668db7392039dab"]
|
||||
};
|
||||
|
||||
final Map<String, List<dynamic>> historyBatchArgs2 = {
|
||||
"k_0_0": ["4cff1590918be5d24d130f10627aaacc6d1e3f03872643c3afc742e6c77e3e72"],
|
||||
"k_0_1": ["3fedd8a2d5fc355727afe353413dc1a0ef861ba768744d5b8193c33cbc829339"],
|
||||
"k_0_2": ["68668ef2d53d4cb5bda66ce3adae25dbe7a8466eb3eca64ed816a59cf8362288"],
|
||||
"k_0_3": ["8bb32cbd5de862d6305813e312b0caec7249692c6f41154b4855003450c58f6d"],
|
||||
"k_0_4": ["d66592642c8dcbde165c04fd394ed92bcef89bbadbfd8cbe213cea0e811708ce"],
|
||||
"k_0_5": ["72ac3ef3b722777e5e7cf75eaf8324cb7db0c575a6a8640609757c99a71bca91"],
|
||||
"k_0_6": ["be8f9884d1655f84993572924729f52ec66b56582adf44b841cebdf42d3dcd5b"],
|
||||
"k_0_7": ["c5a53feb8be5ea226da3e72bfcb522569f7956d137266e3da16ada99d0c4817b"],
|
||||
"k_0_8": ["f50124f4371374e623db18f24bf01644018b0a47351dfa5624df9706c5409dca"],
|
||||
"k_0_9": ["83f0334c6c57164ac6fd9c83b89f1977e2e4bf9144dd25c992e3def16242ae8c"],
|
||||
"k_0_10": [
|
||||
"e04e7d94a880ccbd8ce473ce5e780fd86003137cef1e879e38971e4216a282e1"
|
||||
],
|
||||
"k_0_11": ["f6a7b80c32f2568bebe37d6615ebfa602ec04207cd9edf304ff7f835b03c27d2"]
|
||||
};
|
||||
|
||||
final Map<String, List<dynamic>> historyBatchArgs3 = {
|
||||
"k_0_0": ["f2547dcbe38adc0fee943dc0b0a543f96b90af587850c9df172c69134a49f4c9"],
|
||||
"k_0_1": ["0e8b6756b404db5a381fd71ad79cb595a6c36c938cf9913c5a0494b667c2151a"],
|
||||
"k_0_2": ["099bdff41fbbfc3d90ea5a8510d5588e71a27509592447025ee6dee4278e13ff"],
|
||||
"k_0_3": ["c1ae51351f1267bf6747c888760f25cc199747a3cc2be7dd6a899223d748508c"],
|
||||
"k_0_4": ["7eba642b2889d562edc75dc2653caf1d2b864a9db8a0e64e1b6d62e014c6ed5b"],
|
||||
"k_0_5": ["be2b6216b6effadfa12f4588612396daa781a40b50a7bd73c1bf722b7855d4c3"],
|
||||
"k_0_6": ["ddf040fca6a4609fcb1045216fc17772b821cf560802be267bd433596c2aa897"],
|
||||
"k_0_7": ["5c9c6a409240e59d731c7d87c58d701e2d99cc87d073ff07114ebf5db602e87d"],
|
||||
"k_0_8": ["03b3c0dae8d561f1ab38199b5dfa4930a18fe702b14332b996c93364819aef56"],
|
||||
"k_0_9": ["98bf1f26ff3e8db88a4506d476122c2b2ff7f8e9e217b351e532fb95d6c9e308"],
|
||||
"k_0_10": [
|
||||
"0c6c028ede10b0c3180e9541675c16b72f4443663dd7dbe9b45037b230d55917"
|
||||
],
|
||||
"k_0_11": ["eb1ebeefa4bc5f754daabb0f783f3685bd839429ee0a287bd26d8717265c3d27"]
|
||||
};
|
||||
|
||||
final Map<String, List<Map<String, dynamic>>> historyBatchResponse = {
|
||||
"k_0_0": [],
|
||||
"s_0_0": [{}, {}],
|
||||
"w_0_0": [],
|
||||
"k_0_1": [{}],
|
||||
"s_0_1": [],
|
||||
"w_0_1": [{}, {}, {}],
|
||||
"k_0_2": [],
|
||||
"s_0_2": [],
|
||||
"w_0_2": [],
|
||||
"k_0_3": [],
|
||||
"s_0_3": [],
|
||||
"w_0_3": [],
|
||||
"k_0_4": [],
|
||||
"s_0_4": [],
|
||||
"w_0_4": [],
|
||||
"k_0_5": [],
|
||||
"s_0_5": [],
|
||||
"w_0_5": [],
|
||||
"k_0_6": [],
|
||||
"s_0_6": [],
|
||||
"w_0_6": [],
|
||||
"k_0_7": [],
|
||||
"s_0_7": [],
|
||||
"w_0_7": [],
|
||||
"k_0_8": [],
|
||||
"s_0_8": [],
|
||||
"w_0_8": [],
|
||||
"k_0_9": [],
|
||||
"s_0_9": [],
|
||||
"w_0_9": [],
|
||||
"k_0_10": [],
|
||||
"s_0_10": [],
|
||||
"w_0_10": [],
|
||||
"k_0_11": [],
|
||||
"s_0_11": [],
|
||||
"w_0_11": []
|
||||
};
|
||||
|
||||
final Map<String, List<Map<String, dynamic>>> emptyHistoryBatchResponse = {
|
||||
"k_0_0": [],
|
||||
"s_0_0": [],
|
||||
"w_0_0": [],
|
||||
"k_0_1": [],
|
||||
"s_0_1": [],
|
||||
"w_0_1": [],
|
||||
"k_0_2": [],
|
||||
"s_0_2": [],
|
||||
"w_0_2": [],
|
||||
"k_0_3": [],
|
||||
"s_0_3": [],
|
||||
"w_0_3": [],
|
||||
"k_0_4": [],
|
||||
"s_0_4": [],
|
||||
"w_0_4": [],
|
||||
"k_0_5": [],
|
||||
"s_0_5": [],
|
||||
"w_0_5": [],
|
||||
"k_0_6": [],
|
||||
"s_0_6": [],
|
||||
"w_0_6": [],
|
||||
"k_0_7": [],
|
||||
"s_0_7": [],
|
||||
"w_0_7": [],
|
||||
"k_0_8": [],
|
||||
"s_0_8": [],
|
||||
"w_0_8": [],
|
||||
"k_0_9": [],
|
||||
"s_0_9": [],
|
||||
"w_0_9": [],
|
||||
"k_0_10": [],
|
||||
"s_0_10": [],
|
||||
"w_0_10": [],
|
||||
"k_0_11": [],
|
||||
"s_0_11": [],
|
||||
"w_0_11": []
|
||||
};
|
||||
|
||||
final List<String> activeScriptHashes = [
|
||||
"3fedd8a2d5fc355727afe353413dc1a0ef861ba768744d5b8193c33cbc829339",
|
||||
"b6fce6c41154ccf70676c5c91acd9b6899ef0195e34b4c05c4920daa827c19a3",
|
||||
"0e8b6756b404db5a381fd71ad79cb595a6c36c938cf9913c5a0494b667c2151a",
|
||||
"c4b1d9cd4edb7c13eae863b1e4f8fd5acff29f1fe153c4f859906cbea26a3f2f"
|
||||
];
|
|
@ -0,0 +1,372 @@
|
|||
import 'package:stackwallet/models/paymint/transactions_model.dart';
|
||||
|
||||
final transactionData = TransactionData.fromMap({
|
||||
"a51831f09072dc9edb3130f677a484ca03bced8f6d803e8df83a1ed84bc06c0a": tx1,
|
||||
"39a9c37d54d04f9ac6ed45aaa1a02b058391b5d1fc0e2e1d67e50f36b1d82896": tx2,
|
||||
"e53ef367a5f9d8493825400a291136870ea24a750f63897f559851ab80ea1020": tx3,
|
||||
"10e14b1d34c18a563b476c4c36688eb7caebf6658e25753074471d2adef460ba": tx4,
|
||||
});
|
||||
|
||||
final tx1 = Transaction(
|
||||
txid: "a51831f09072dc9edb3130f677a484ca03bced8f6d803e8df83a1ed84bc06c0a",
|
||||
confirmedStatus: true,
|
||||
confirmations: 15447,
|
||||
txType: "Received",
|
||||
amount: 10000000,
|
||||
fees: 53600,
|
||||
height: 1299909,
|
||||
address: "PtQCgwUx9mLmRDWxB3J7MPnNsWDcce7a5g",
|
||||
timestamp: 1667814832,
|
||||
worthNow: "0.00",
|
||||
worthAtBlockTimestamp: "0.00",
|
||||
inputSize: 2,
|
||||
outputSize: 2,
|
||||
inputs: [
|
||||
Input(
|
||||
txid: "e53ef367a5f9d8493825400a291136870ea24a750f63897f559851ab80ea1020",
|
||||
vout: 1,
|
||||
),
|
||||
Input(
|
||||
txid: "b255bf1b4b2f1a76eab45fd69e589b655261b049f238807b0acbf304d1b8195b",
|
||||
vout: 0,
|
||||
),
|
||||
],
|
||||
outputs: [
|
||||
Output(
|
||||
scriptpubkeyAddress: "PtQCgwUx9mLmRDWxB3J7MPnNsWDcce7a5g",
|
||||
value: 10000000,
|
||||
),
|
||||
Output(
|
||||
scriptpubkeyAddress: "PsHtVuRCybcTpJQN6ckLFptPB7k9ZkqztA",
|
||||
value: 9946400,
|
||||
)
|
||||
],
|
||||
);
|
||||
|
||||
final tx2 = Transaction(
|
||||
txid: "39a9c37d54d04f9ac6ed45aaa1a02b058391b5d1fc0e2e1d67e50f36b1d82896",
|
||||
confirmedStatus: true,
|
||||
confirmations: 13927,
|
||||
txType: "Sent",
|
||||
amount: 50000000,
|
||||
fees: 49500,
|
||||
height: 1301433,
|
||||
address: "PcKLXor8hqb3qSjtoHQThapJSbPapSDt4C",
|
||||
timestamp: 1668010880,
|
||||
worthNow: "0.00",
|
||||
worthAtBlockTimestamp: "0.00",
|
||||
inputSize: 1,
|
||||
outputSize: 2,
|
||||
inputs: [
|
||||
Input(
|
||||
txid: "909bdf555736c272df0e1df52ca5fcce4f1090b74c0e5d9319bb40e02f4b3add",
|
||||
vout: 1,
|
||||
),
|
||||
],
|
||||
outputs: [
|
||||
Output(
|
||||
scriptpubkeyAddress: "PcKLXor8hqb3qSjtoHQThapJSbPapSDt4C",
|
||||
value: 50000000,
|
||||
),
|
||||
Output(
|
||||
scriptpubkeyAddress: "PjDq9kwadvgKNtQLTdGqcDsFzPmk9LMjT7",
|
||||
value: 1749802000,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
final tx3 = Transaction(
|
||||
txid: "e53ef367a5f9d8493825400a291136870ea24a750f63897f559851ab80ea1020",
|
||||
confirmedStatus: true,
|
||||
confirmations: 23103,
|
||||
txType: "Received",
|
||||
amount: 10000000,
|
||||
fees: 34623,
|
||||
height: 1292263,
|
||||
address: "PhDSyHLt7ejdPXGve3HFr93pSdFLHUBwdr",
|
||||
timestamp: 1666827392,
|
||||
worthNow: "0.00",
|
||||
worthAtBlockTimestamp: "0.00",
|
||||
inputSize: 1,
|
||||
outputSize: 2,
|
||||
inputs: [
|
||||
Input(
|
||||
txid: "8a2c6a4c0797d057f20f93b5e3b6e5f306493c67b2341626e0375f30f35a2d47",
|
||||
vout: 0,
|
||||
)
|
||||
],
|
||||
outputs: [
|
||||
Output(
|
||||
scriptpubkeyAddress: "PYv7kk7TKQsSosWLuLveMJqAYxTiDiK5kp",
|
||||
value: 39915877,
|
||||
),
|
||||
Output(
|
||||
scriptpubkeyAddress: "PhDSyHLt7ejdPXGve3HFr93pSdFLHUBwdr",
|
||||
value: 10000000,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
final tx4 = Transaction(
|
||||
txid: "10e14b1d34c18a563b476c4c36688eb7caebf6658e25753074471d2adef460ba",
|
||||
confirmedStatus: true,
|
||||
confirmations: 493,
|
||||
txType: "Sent",
|
||||
amount: 9945773,
|
||||
fees: 27414,
|
||||
height: 1314873,
|
||||
address: "PpqgMahyfqfasunUKfkmVfdpyhhrHa2ibY",
|
||||
timestamp: 1669740960,
|
||||
worthNow: "0.00",
|
||||
worthAtBlockTimestamp: "0.00",
|
||||
inputSize: 1,
|
||||
outputSize: 1,
|
||||
inputs: [
|
||||
Input(
|
||||
txid: "aab01876c4db40b35ba00bbfb7c58aaec32cad7dc136214b7344a944606cbe73",
|
||||
vout: 0,
|
||||
),
|
||||
],
|
||||
outputs: [
|
||||
Output(
|
||||
scriptpubkeyAddress: "PpqgMahyfqfasunUKfkmVfdpyhhrHa2ibY",
|
||||
value: 9945773,
|
||||
),
|
||||
],
|
||||
);
|
||||
|
||||
final tx1Raw = {
|
||||
"txid": "a51831f09072dc9edb3130f677a484ca03bced8f6d803e8df83a1ed84bc06c0a",
|
||||
"hash": "46b7358ccbc018da4e144188f311657e8b694f056211d7511726c4259dca86b4",
|
||||
"size": 374,
|
||||
"vsize": 267,
|
||||
"version": 160,
|
||||
"locktime": 1299908,
|
||||
"vin": [
|
||||
{
|
||||
"txid":
|
||||
"e53ef367a5f9d8493825400a291136870ea24a750f63897f559851ab80ea1020",
|
||||
"vout": 1,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"30440220336bf0952b543314ba37b1bb8866a65b2482b499c715d778e92e90d7d59c6a39022072cae4341ca8825bee8043ae91f18de5776edd069ed228142eca55a16c887d6b01",
|
||||
"026b4ca62de9e8f63abd0a6cf176536fe8e6a64d6343b6396aa9fb35232520e4a7"
|
||||
],
|
||||
"sequence": 4294967293
|
||||
},
|
||||
{
|
||||
"txid":
|
||||
"b255bf1b4b2f1a76eab45fd69e589b655261b049f238807b0acbf304d1b8195b",
|
||||
"vout": 0,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"304402205b914f31952958d54f0290d47eef6d9042259387c9493993882e24bd9acefe00022066b16f2f41885a85051c9bff4c119ecddc0209520e9a93d75866624f11b4e82d01",
|
||||
"026b4ca62de9e8f63abd0a6cf176536fe8e6a64d6343b6396aa9fb35232520e4a7"
|
||||
],
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"n": 0,
|
||||
"type": "standard",
|
||||
"value": 0.1,
|
||||
"valueSat": 10000000,
|
||||
"scriptPubKey": {
|
||||
"asm":
|
||||
"OP_DUP OP_HASH160 e0923d464a2c30438f0808e4af94868253b63ca0 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a914e0923d464a2c30438f0808e4af94868253b63ca088ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": ["PtQCgwUx9mLmRDWxB3J7MPnNsWDcce7a5g"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"n": 1,
|
||||
"type": "standard",
|
||||
"value": 0.099464,
|
||||
"valueSat": 9946400,
|
||||
"scriptPubKey": {
|
||||
"asm":
|
||||
"OP_DUP OP_HASH160 d4686eee8cd127b50d28869627d61b38cc63fe4a OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a914d4686eee8cd127b50d28869627d61b38cc63fe4a88ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": ["PsHtVuRCybcTpJQN6ckLFptPB7k9ZkqztA"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash":
|
||||
"b7cb29eb9cb4fa73c4da32f5cf8dfd90194eb6b689d4e547fa9b3176a698a741",
|
||||
"height": 1299909,
|
||||
"confirmations": 15447,
|
||||
"time": 1667814832,
|
||||
"blocktime": 1667814832
|
||||
};
|
||||
|
||||
final tx2Raw = {
|
||||
"txid": "39a9c37d54d04f9ac6ed45aaa1a02b058391b5d1fc0e2e1d67e50f36b1d82896",
|
||||
"hash": "85130125ec9e37a48670fb5eb0a2780b94ea958cd700a1237ff75775d8a0edb0",
|
||||
"size": 226,
|
||||
"vsize": 173,
|
||||
"version": 160,
|
||||
"locktime": 1301432,
|
||||
"vin": [
|
||||
{
|
||||
"txid":
|
||||
"909bdf555736c272df0e1df52ca5fcce4f1090b74c0e5d9319bb40e02f4b3add",
|
||||
"vout": 1,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"30440220486c87376122e2d3ca7154f41a45fdafa2865412ec90e4b3db791915eee1d13002204cca8520a655b43c3cddc216725cc8508cd9b326a39ed99ed893be59167289af01",
|
||||
"03acc7ad6e2e9560db73f7ec7ef2f55a6115d85069cf0eacfe3ab663f33415573c"
|
||||
],
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"n": 0,
|
||||
"type": "standard",
|
||||
"value": 0.5,
|
||||
"valueSat": 50000000,
|
||||
"scriptPubKey": {
|
||||
"asm":
|
||||
"OP_DUP OP_HASH160 3024b192883be45b197b548f71155829af980724 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a9143024b192883be45b197b548f71155829af98072488ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": ["PcKLXor8hqb3qSjtoHQThapJSbPapSDt4C"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"n": 1,
|
||||
"type": "standard",
|
||||
"value": 17.49802,
|
||||
"valueSat": 1749802000,
|
||||
"scriptPubKey": {
|
||||
"asm":
|
||||
"OP_DUP OP_HASH160 7be2f80f6b9f6df740142fb34668c25c4e5c8bd5 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a9147be2f80f6b9f6df740142fb34668c25c4e5c8bd588ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": ["PjDq9kwadvgKNtQLTdGqcDsFzPmk9LMjT7"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash":
|
||||
"065c7328f1a768f3005ab7bfb322806bcc0cf88a96e89830b44991cc434c9955",
|
||||
"height": 1301433,
|
||||
"confirmations": 13927,
|
||||
"time": 1668010880,
|
||||
"blocktime": 1668010880
|
||||
};
|
||||
|
||||
final tx3Raw = {
|
||||
"txid": "71b56532e9e7321bd8c30d0f8b14530743049d2f3edd5623065c46eee1dda04d",
|
||||
"hash": "bb25567e1ffb2fd6ec9aa3925a7a8dd3055a29521f7811b2b2bc01ce7d8a216e",
|
||||
"version": 2,
|
||||
"size": 370,
|
||||
"vsize": 208,
|
||||
"weight": 832,
|
||||
"locktime": 0,
|
||||
"vin": [
|
||||
{
|
||||
"txid":
|
||||
"dffa9543852197f9fb90f8adafaab8a0b9b4925e9ada8c6bdcaf00bf2e9f60d7",
|
||||
"vout": 0,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"304402203535cf570aca7c1acfa6e8d2f43e0b188b76d0b7a75ffca448e6af953ffe8b6302202ea52b312aaaf6d615d722bd92535d1e8b25fa9584a8dbe34dfa1ea9c18105ca01",
|
||||
"038b68078a95f73f8710e8464dec52c61f9e21675ddf69d4f61b93cc417cf73d74"
|
||||
],
|
||||
"sequence": 4294967295
|
||||
},
|
||||
{
|
||||
"txid":
|
||||
"80f8c6de5be2243013348219bbb7043a6d8d00ddc716baf6a69eab517f9a6fc1",
|
||||
"vout": 1,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"3044022045268613674326251c46caeaf435081ca753e4ee2018d79480c4930ad7d5e19f022050090a9add82e7272b8206b9d369675e7e9a5f1396fc93490143f0053666102901",
|
||||
"028e2ede901e69887cb80603c8e207839f61a477d59beff17705162a2045dd974e"
|
||||
],
|
||||
"sequence": 4294967295
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"value": 0.01,
|
||||
"n": 0,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 756037000a8676334b35368581a29143fc078471",
|
||||
"hex": "0014756037000a8676334b35368581a29143fc078471",
|
||||
"reqSigs": 1,
|
||||
"type": "witness_v0_keyhash",
|
||||
"addresses": ["nc1qw4srwqq2semrxje4x6zcrg53g07q0pr3yqv5kr"]
|
||||
}
|
||||
},
|
||||
{
|
||||
"value": 0.2880577,
|
||||
"n": 1,
|
||||
"scriptPubKey": {
|
||||
"asm": "0 8207ee56ed52878d546567f29d17332b85f66e4b",
|
||||
"hex": "00148207ee56ed52878d546567f29d17332b85f66e4b",
|
||||
"reqSigs": 1,
|
||||
"type": "witness_v0_keyhash",
|
||||
"addresses": ["nc1qsgr7u4hd22rc64r9vlef69en9wzlvmjt8dzyrm"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"hex":
|
||||
"02000000000102d7609f2ebf00afdc6b8cda9a5e92b4b9a0b8aaafadf890fbf99721854395fadf0000000000ffffffffc16f9a7f51ab9ea6f6ba16c7dd008d6d3a04b7bb198234133024e25bdec6f8800100000000ffffffff0240420f0000000000160014756037000a8676334b35368581a29143fc0784718a8ab701000000001600148207ee56ed52878d546567f29d17332b85f66e4b0247304402203535cf570aca7c1acfa6e8d2f43e0b188b76d0b7a75ffca448e6af953ffe8b6302202ea52b312aaaf6d615d722bd92535d1e8b25fa9584a8dbe34dfa1ea9c18105ca0121038b68078a95f73f8710e8464dec52c61f9e21675ddf69d4f61b93cc417cf73d7402473044022045268613674326251c46caeaf435081ca753e4ee2018d79480c4930ad7d5e19f022050090a9add82e7272b8206b9d369675e7e9a5f1396fc93490143f005366610290121028e2ede901e69887cb80603c8e207839f61a477d59beff17705162a2045dd974e00000000",
|
||||
"blockhash":
|
||||
"98f388ba99e3b6fc421c23edf3c699ada082b01e5a5d130af7550b7fa6184f2f",
|
||||
"confirmations": 147,
|
||||
"time": 1663145287,
|
||||
"blocktime": 1663145287
|
||||
};
|
||||
|
||||
final tx4Raw = {
|
||||
"txid": "10e14b1d34c18a563b476c4c36688eb7caebf6658e25753074471d2adef460ba",
|
||||
"hash": "cb0d83958db55c91fb9cd9cab65ee516e63aea68ae5650a692918779ceb46576",
|
||||
"size": 191,
|
||||
"vsize": 138,
|
||||
"version": 160,
|
||||
"locktime": 1314871,
|
||||
"vin": [
|
||||
{
|
||||
"txid":
|
||||
"aab01876c4db40b35ba00bbfb7c58aaec32cad7dc136214b7344a944606cbe73",
|
||||
"vout": 0,
|
||||
"scriptSig": {"asm": "", "hex": ""},
|
||||
"txinwitness": [
|
||||
"304402202e33ab9c5bb6a50c24de9ebfd1b2f398b4c9027787fb9620fda515a25b62ffcf02205e8371aeeda3b3765fa1e2a5c7ebce5dffbf18932012670c1f5266992f9ed9c901",
|
||||
"039ca6c697fed4daf1697f137e7d5b113ff7b6c48ea48d707addd9cfa51889a42a"
|
||||
],
|
||||
"sequence": 4294967293
|
||||
}
|
||||
],
|
||||
"vout": [
|
||||
{
|
||||
"n": 0,
|
||||
"type": "standard",
|
||||
"value": 0.09945773,
|
||||
"valueSat": 9945773,
|
||||
"scriptPubKey": {
|
||||
"asm":
|
||||
"OP_DUP OP_HASH160 b9833ad924ab05567ea2b679a5c523c66a1da6d7 OP_EQUALVERIFY OP_CHECKSIG",
|
||||
"hex": "76a914b9833ad924ab05567ea2b679a5c523c66a1da6d788ac",
|
||||
"reqSigs": 1,
|
||||
"type": "pubkeyhash",
|
||||
"addresses": ["PpqgMahyfqfasunUKfkmVfdpyhhrHa2ibY"]
|
||||
}
|
||||
}
|
||||
],
|
||||
"blockhash":
|
||||
"74e2d8acec688645120925c8a10d2fdf9ec61278534c0788d749162a6899ddaf",
|
||||
"height": 1314873,
|
||||
"confirmations": 493,
|
||||
"time": 1669740960,
|
||||
"blocktime": 1669740960
|
||||
};
|
58
test/services/coins/particl/particl_utxo_sample_data.dart
Normal file
58
test/services/coins/particl/particl_utxo_sample_data.dart
Normal file
|
@ -0,0 +1,58 @@
|
|||
import 'package:stackwallet/models/paymint/utxo_model.dart';
|
||||
|
||||
final Map<String, List<Map<String, dynamic>>> batchGetUTXOResponse0 = {
|
||||
"some id 0": [
|
||||
{
|
||||
"tx_pos": 0,
|
||||
"value": 9973187,
|
||||
"tx_hash":
|
||||
"7b932948c95cf483798011da3fc77b6d53ee26d3d2ba4d90748cd007bdce48e8",
|
||||
"height": 1314869
|
||||
},
|
||||
{
|
||||
"tx_pos": 0,
|
||||
"value": 50000000,
|
||||
"tx_hash":
|
||||
"aae9e712e26e5ff77ac2258c47a845ad6e952d580c2ad805e2b5d7667f3d4e42",
|
||||
"height": 1297229
|
||||
},
|
||||
],
|
||||
"some id 1": [],
|
||||
};
|
||||
|
||||
final utxoList = [
|
||||
UtxoObject(
|
||||
txid: "aab01876c4db40b35ba00bbfb7c58aaec32cad7dc136214b7344a944606cbe73",
|
||||
vout: 0,
|
||||
status: Status(
|
||||
confirmed: true,
|
||||
confirmations: 516,
|
||||
blockHeight: 1314869,
|
||||
blockTime: 1669740688,
|
||||
blockHash:
|
||||
"6146005e4b21b72d0e2afe5b0cce3abd6e9e9e71c6cf6a1e1150d33e33ba81d4",
|
||||
),
|
||||
value: 9973187,
|
||||
fiatWorth: "\$0",
|
||||
txName: "pw1qj6t0kvsmx8qd95pdh4rwxaz5qp5qtfz0xq2rja",
|
||||
blocked: false,
|
||||
isCoinbase: false,
|
||||
),
|
||||
UtxoObject(
|
||||
txid: "909bdf555736c272df0e1df52ca5fcce4f1090b74c0e5d9319bb40e02f4b3add",
|
||||
vout: 0,
|
||||
status: Status(
|
||||
confirmed: true,
|
||||
confirmations: 18173,
|
||||
blockHeight: 1297229,
|
||||
blockTime: 1667469296,
|
||||
blockHash:
|
||||
"5c5c1a4e2d9cc77a1df4337359f901c92bb4907cff85312599b06141fd1d96d9",
|
||||
),
|
||||
value: 50000000,
|
||||
fiatWorth: "\$0",
|
||||
txName: "PhDSyHLt7ejdPXGve3HFr93pSdFLHUBwdr",
|
||||
blocked: false,
|
||||
isCoinbase: false,
|
||||
),
|
||||
];
|
1664
test/services/coins/particl/particl_wallet_test.dart
Normal file
1664
test/services/coins/particl/particl_wallet_test.dart
Normal file
File diff suppressed because it is too large
Load diff
629
test/services/coins/particl/particl_wallet_test.mocks.dart
Normal file
629
test/services/coins/particl/particl_wallet_test.mocks.dart
Normal file
|
@ -0,0 +1,629 @@
|
|||
// Mocks generated by Mockito 5.3.2 from annotations
|
||||
// in stackwallet/test/services/coins/particl/particl_wallet_test.dart.
|
||||
// Do not manually edit this file.
|
||||
|
||||
// ignore_for_file: no_leading_underscores_for_library_prefixes
|
||||
import 'dart:async' as _i6;
|
||||
|
||||
import 'package:decimal/decimal.dart' as _i2;
|
||||
import 'package:http/http.dart' as _i4;
|
||||
import 'package:mockito/mockito.dart' as _i1;
|
||||
import 'package:stackwallet/electrumx_rpc/cached_electrumx.dart' as _i7;
|
||||
import 'package:stackwallet/electrumx_rpc/electrumx.dart' as _i5;
|
||||
import 'package:stackwallet/services/price.dart' as _i9;
|
||||
import 'package:stackwallet/services/transaction_notification_tracker.dart'
|
||||
as _i11;
|
||||
import 'package:stackwallet/utilities/enums/coin_enum.dart' as _i8;
|
||||
import 'package:stackwallet/utilities/prefs.dart' as _i3;
|
||||
import 'package:tuple/tuple.dart' as _i10;
|
||||
|
||||
// ignore_for_file: type=lint
|
||||
// ignore_for_file: avoid_redundant_argument_values
|
||||
// ignore_for_file: avoid_setters_without_getters
|
||||
// ignore_for_file: comment_references
|
||||
// ignore_for_file: implementation_imports
|
||||
// ignore_for_file: invalid_use_of_visible_for_testing_member
|
||||
// ignore_for_file: prefer_const_constructors
|
||||
// ignore_for_file: unnecessary_parenthesis
|
||||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeDecimal_0 extends _i1.SmartFake implements _i2.Decimal {
|
||||
_FakeDecimal_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakePrefs_1 extends _i1.SmartFake implements _i3.Prefs {
|
||||
_FakePrefs_1(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
class _FakeClient_2 extends _i1.SmartFake implements _i4.Client {
|
||||
_FakeClient_2(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
parent,
|
||||
parentInvocation,
|
||||
);
|
||||
}
|
||||
|
||||
/// A class which mocks [ElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockElectrumX extends _i1.Mock implements _i5.ElectrumX {
|
||||
MockElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
set failovers(List<_i5.ElectrumXNode>? _failovers) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#failovers,
|
||||
_failovers,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get currentFailoverIndex => (super.noSuchMethod(
|
||||
Invocation.getter(#currentFailoverIndex),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set currentFailoverIndex(int? _currentFailoverIndex) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#currentFailoverIndex,
|
||||
_currentFailoverIndex,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
String get host => (super.noSuchMethod(
|
||||
Invocation.getter(#host),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
int get port => (super.noSuchMethod(
|
||||
Invocation.getter(#port),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
bool get useSSL => (super.noSuchMethod(
|
||||
Invocation.getter(#useSSL),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i6.Future<dynamic> request({
|
||||
required String? command,
|
||||
List<dynamic>? args = const [],
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
String? requestID,
|
||||
int? retries = 2,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#request,
|
||||
[],
|
||||
{
|
||||
#command: command,
|
||||
#args: args,
|
||||
#connectionTimeout: connectionTimeout,
|
||||
#requestID: requestID,
|
||||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<dynamic>.value(),
|
||||
) as _i6.Future<dynamic>);
|
||||
@override
|
||||
_i6.Future<List<Map<String, dynamic>>> batchRequest({
|
||||
required String? command,
|
||||
required Map<String, List<dynamic>>? args,
|
||||
Duration? connectionTimeout = const Duration(seconds: 60),
|
||||
int? retries = 2,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#batchRequest,
|
||||
[],
|
||||
{
|
||||
#command: command,
|
||||
#args: args,
|
||||
#connectionTimeout: connectionTimeout,
|
||||
#retries: retries,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i6.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i6.Future<bool> ping({
|
||||
String? requestID,
|
||||
int? retryCount = 1,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#ping,
|
||||
[],
|
||||
{
|
||||
#requestID: requestID,
|
||||
#retryCount: retryCount,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<bool>.value(false),
|
||||
) as _i6.Future<bool>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getBlockHeadTip({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBlockHeadTip,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getServerFeatures({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getServerFeatures,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<String> broadcastTransaction({
|
||||
required String? rawTx,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#broadcastTransaction,
|
||||
[],
|
||||
{
|
||||
#rawTx: rawTx,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<String>.value(''),
|
||||
) as _i6.Future<String>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getBalance({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBalance,
|
||||
[],
|
||||
{
|
||||
#scripthash: scripthash,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<List<Map<String, dynamic>>> getHistory({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getHistory,
|
||||
[],
|
||||
{
|
||||
#scripthash: scripthash,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i6.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i6.Future<Map<String, List<Map<String, dynamic>>>> getBatchHistory(
|
||||
{required Map<String, List<dynamic>>? args}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBatchHistory,
|
||||
[],
|
||||
{#args: args},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||
<String, List<Map<String, dynamic>>>{}),
|
||||
) as _i6.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i6.Future<List<Map<String, dynamic>>> getUTXOs({
|
||||
required String? scripthash,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getUTXOs,
|
||||
[],
|
||||
{
|
||||
#scripthash: scripthash,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<List<Map<String, dynamic>>>.value(
|
||||
<Map<String, dynamic>>[]),
|
||||
) as _i6.Future<List<Map<String, dynamic>>>);
|
||||
@override
|
||||
_i6.Future<Map<String, List<Map<String, dynamic>>>> getBatchUTXOs(
|
||||
{required Map<String, List<dynamic>>? args}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getBatchUTXOs,
|
||||
[],
|
||||
{#args: args},
|
||||
),
|
||||
returnValue: _i6.Future<Map<String, List<Map<String, dynamic>>>>.value(
|
||||
<String, List<Map<String, dynamic>>>{}),
|
||||
) as _i6.Future<Map<String, List<Map<String, dynamic>>>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
bool? verbose = true,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getTransaction,
|
||||
[],
|
||||
{
|
||||
#txHash: txHash,
|
||||
#verbose: verbose,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
String? groupId = r'1',
|
||||
String? blockhash = r'',
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAnonymitySet,
|
||||
[],
|
||||
{
|
||||
#groupId: groupId,
|
||||
#blockhash: blockhash,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<dynamic> getMintData({
|
||||
dynamic mints,
|
||||
String? requestID,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getMintData,
|
||||
[],
|
||||
{
|
||||
#mints: mints,
|
||||
#requestID: requestID,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<dynamic>.value(),
|
||||
) as _i6.Future<dynamic>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getUsedCoinSerials({
|
||||
String? requestID,
|
||||
required int? startNumber,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getUsedCoinSerials,
|
||||
[],
|
||||
{
|
||||
#requestID: requestID,
|
||||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<int> getLatestCoinId({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getLatestCoinId,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i6.Future<int>.value(0),
|
||||
) as _i6.Future<int>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getFeeRate({String? requestID}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getFeeRate,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<_i2.Decimal> estimateFee({
|
||||
String? requestID,
|
||||
required int? blocks,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
[],
|
||||
{
|
||||
#requestID: requestID,
|
||||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#estimateFee,
|
||||
[],
|
||||
{
|
||||
#requestID: requestID,
|
||||
#blocks: blocks,
|
||||
},
|
||||
),
|
||||
)),
|
||||
) as _i6.Future<_i2.Decimal>);
|
||||
@override
|
||||
_i6.Future<_i2.Decimal> relayFee({String? requestID}) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
returnValue: _i6.Future<_i2.Decimal>.value(_FakeDecimal_0(
|
||||
this,
|
||||
Invocation.method(
|
||||
#relayFee,
|
||||
[],
|
||||
{#requestID: requestID},
|
||||
),
|
||||
)),
|
||||
) as _i6.Future<_i2.Decimal>);
|
||||
}
|
||||
|
||||
/// A class which mocks [CachedElectrumX].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockCachedElectrumX extends _i1.Mock implements _i7.CachedElectrumX {
|
||||
MockCachedElectrumX() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get server => (super.noSuchMethod(
|
||||
Invocation.getter(#server),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
int get port => (super.noSuchMethod(
|
||||
Invocation.getter(#port),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
bool get useSSL => (super.noSuchMethod(
|
||||
Invocation.getter(#useSSL),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i3.Prefs get prefs => (super.noSuchMethod(
|
||||
Invocation.getter(#prefs),
|
||||
returnValue: _FakePrefs_1(
|
||||
this,
|
||||
Invocation.getter(#prefs),
|
||||
),
|
||||
) as _i3.Prefs);
|
||||
@override
|
||||
List<_i5.ElectrumXNode> get failovers => (super.noSuchMethod(
|
||||
Invocation.getter(#failovers),
|
||||
returnValue: <_i5.ElectrumXNode>[],
|
||||
) as List<_i5.ElectrumXNode>);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getAnonymitySet({
|
||||
required String? groupId,
|
||||
String? blockhash = r'',
|
||||
required _i8.Coin? coin,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getAnonymitySet,
|
||||
[],
|
||||
{
|
||||
#groupId: groupId,
|
||||
#blockhash: blockhash,
|
||||
#coin: coin,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
String base64ToHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#base64ToHex,
|
||||
[source],
|
||||
),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
String base64ToReverseHex(String? source) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#base64ToReverseHex,
|
||||
[source],
|
||||
),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
_i6.Future<Map<String, dynamic>> getTransaction({
|
||||
required String? txHash,
|
||||
required _i8.Coin? coin,
|
||||
bool? verbose = true,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getTransaction,
|
||||
[],
|
||||
{
|
||||
#txHash: txHash,
|
||||
#coin: coin,
|
||||
#verbose: verbose,
|
||||
},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<String, dynamic>>.value(<String, dynamic>{}),
|
||||
) as _i6.Future<Map<String, dynamic>>);
|
||||
@override
|
||||
_i6.Future<List<dynamic>> getUsedCoinSerials({
|
||||
required _i8.Coin? coin,
|
||||
int? startNumber = 0,
|
||||
}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getUsedCoinSerials,
|
||||
[],
|
||||
{
|
||||
#coin: coin,
|
||||
#startNumber: startNumber,
|
||||
},
|
||||
),
|
||||
returnValue: _i6.Future<List<dynamic>>.value(<dynamic>[]),
|
||||
) as _i6.Future<List<dynamic>>);
|
||||
@override
|
||||
_i6.Future<void> clearSharedTransactionCache({required _i8.Coin? coin}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#clearSharedTransactionCache,
|
||||
[],
|
||||
{#coin: coin},
|
||||
),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
}
|
||||
|
||||
/// A class which mocks [PriceAPI].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockPriceAPI extends _i1.Mock implements _i9.PriceAPI {
|
||||
MockPriceAPI() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
_i4.Client get client => (super.noSuchMethod(
|
||||
Invocation.getter(#client),
|
||||
returnValue: _FakeClient_2(
|
||||
this,
|
||||
Invocation.getter(#client),
|
||||
),
|
||||
) as _i4.Client);
|
||||
@override
|
||||
void resetLastCalledToForceNextCallToUpdateCache() => super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#resetLastCalledToForceNextCallToUpdateCache,
|
||||
[],
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
_i6.Future<
|
||||
Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>> getPricesAnd24hChange(
|
||||
{required String? baseCurrency}) =>
|
||||
(super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#getPricesAnd24hChange,
|
||||
[],
|
||||
{#baseCurrency: baseCurrency},
|
||||
),
|
||||
returnValue:
|
||||
_i6.Future<Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>>.value(
|
||||
<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>{}),
|
||||
) as _i6.Future<Map<_i8.Coin, _i10.Tuple2<_i2.Decimal, double>>>);
|
||||
}
|
||||
|
||||
/// A class which mocks [TransactionNotificationTracker].
|
||||
///
|
||||
/// See the documentation for Mockito's code generation for more information.
|
||||
class MockTransactionNotificationTracker extends _i1.Mock
|
||||
implements _i11.TransactionNotificationTracker {
|
||||
MockTransactionNotificationTracker() {
|
||||
_i1.throwOnMissingStub(this);
|
||||
}
|
||||
|
||||
@override
|
||||
String get walletId => (super.noSuchMethod(
|
||||
Invocation.getter(#walletId),
|
||||
returnValue: '',
|
||||
) as String);
|
||||
@override
|
||||
List<String> get pendings => (super.noSuchMethod(
|
||||
Invocation.getter(#pendings),
|
||||
returnValue: <String>[],
|
||||
) as List<String>);
|
||||
@override
|
||||
List<String> get confirmeds => (super.noSuchMethod(
|
||||
Invocation.getter(#confirmeds),
|
||||
returnValue: <String>[],
|
||||
) as List<String>);
|
||||
@override
|
||||
bool wasNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#wasNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i6.Future<void> addNotifiedPending(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedPending,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
@override
|
||||
bool wasNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#wasNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: false,
|
||||
) as bool);
|
||||
@override
|
||||
_i6.Future<void> addNotifiedConfirmed(String? txid) => (super.noSuchMethod(
|
||||
Invocation.method(
|
||||
#addNotifiedConfirmed,
|
||||
[txid],
|
||||
),
|
||||
returnValue: _i6.Future<void>.value(),
|
||||
returnValueForMissingStub: _i6.Future<void>.value(),
|
||||
) as _i6.Future<void>);
|
||||
}
|
|
@ -165,9 +165,9 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_12 extends _i1.SmartFake
|
||||
implements _i12.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_12(
|
||||
_FakeSecureStorageInterface_12(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -1400,7 +1400,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i12.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_12(
|
||||
returnValue: _FakeSecureStorageInterface_12(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -24,9 +24,9 @@ import 'package:stackwallet/utilities/flutter_secure_storage_interface.dart'
|
|||
// ignore_for_file: camel_case_types
|
||||
// ignore_for_file: subtype_of_sealed_class
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_0 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_0 extends _i1.SmartFake
|
||||
implements _i2.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_0(
|
||||
_FakeSecureStorageInterface_0(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -46,7 +46,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i2.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_0(
|
||||
returnValue: _FakeSecureStorageInterface_0(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -76,9 +76,9 @@ class _FakeManager_3 extends _i1.SmartFake implements _i6.Manager {
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_4 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_4 extends _i1.SmartFake
|
||||
implements _i7.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_4(
|
||||
_FakeSecureStorageInterface_4(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -446,6 +446,19 @@ class MockPrefs extends _i1.Mock implements _i11.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
@ -623,10 +636,9 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
}
|
||||
|
||||
@override
|
||||
_i7.SecureStorageInterface get secureStorageInterface =>
|
||||
(super.noSuchMethod(
|
||||
_i7.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_4(
|
||||
returnValue: _FakeSecureStorageInterface_4(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -2213,6 +2213,19 @@ class MockPrefs extends _i1.Mock implements _i17.Prefs {
|
|||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
int get familiarity => (super.noSuchMethod(
|
||||
Invocation.getter(#familiarity),
|
||||
returnValue: 0,
|
||||
) as int);
|
||||
@override
|
||||
set familiarity(int? familiarity) => super.noSuchMethod(
|
||||
Invocation.setter(
|
||||
#familiarity,
|
||||
familiarity,
|
||||
),
|
||||
returnValueForMissingStub: null,
|
||||
);
|
||||
@override
|
||||
bool get showTestNetCoins => (super.noSuchMethod(
|
||||
Invocation.getter(#showTestNetCoins),
|
||||
returnValue: false,
|
||||
|
|
|
@ -164,9 +164,9 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_12 extends _i1.SmartFake
|
||||
implements _i12.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_12(
|
||||
_FakeSecureStorageInterface_12(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -1337,7 +1337,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i12.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_12(
|
||||
returnValue: _FakeSecureStorageInterface_12(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
|
@ -164,9 +164,9 @@ class _FakeElectrumXNode_11 extends _i1.SmartFake
|
|||
);
|
||||
}
|
||||
|
||||
class _FakeFlutterSecureStorageInterface_12 extends _i1.SmartFake
|
||||
class _FakeSecureStorageInterface_12 extends _i1.SmartFake
|
||||
implements _i12.SecureStorageInterface {
|
||||
_FakeFlutterSecureStorageInterface_12(
|
||||
_FakeSecureStorageInterface_12(
|
||||
Object parent,
|
||||
Invocation parentInvocation,
|
||||
) : super(
|
||||
|
@ -1337,7 +1337,7 @@ class MockNodeService extends _i1.Mock implements _i3.NodeService {
|
|||
@override
|
||||
_i12.SecureStorageInterface get secureStorageInterface => (super.noSuchMethod(
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
returnValue: _FakeFlutterSecureStorageInterface_12(
|
||||
returnValue: _FakeSecureStorageInterface_12(
|
||||
this,
|
||||
Invocation.getter(#secureStorageInterface),
|
||||
),
|
||||
|
|
Loading…
Reference in a new issue