dark mode testing without partial nmc+bch

This commit is contained in:
julian 2022-09-22 18:06:19 -06:00
parent 4c25c67d89
commit 43b673ec0d
20 changed files with 11814 additions and 11829 deletions

View file

@ -113,12 +113,12 @@ class _AddEditNodeViewState extends ConsumerState<AddEditNodeView> {
break;
case Coin.bitcoin:
case Coin.bitcoincash:
// case Coin.bitcoincash:
case Coin.dogecoin:
case Coin.firo:
case Coin.namecoin:
// case Coin.namecoin:
case Coin.bitcoinTestNet:
case Coin.bitcoincashTestnet:
// case Coin.bitcoincashTestnet:
case Coin.firoTestNet:
case Coin.dogecoinTestNet:
final client = ElectrumX(
@ -529,10 +529,10 @@ class _NodeFormState extends ConsumerState<NodeForm> {
case Coin.bitcoin:
case Coin.dogecoin:
case Coin.firo:
case Coin.namecoin:
case Coin.bitcoincash:
// case Coin.namecoin:
// case Coin.bitcoincash:
case Coin.bitcoinTestNet:
case Coin.bitcoincashTestnet:
// case Coin.bitcoincashTestnet:
case Coin.firoTestNet:
case Coin.dogecoinTestNet:
return false;

View file

@ -102,9 +102,9 @@ class _NodeDetailsViewState extends ConsumerState<NodeDetailsView> {
case Coin.bitcoinTestNet:
case Coin.firoTestNet:
case Coin.dogecoinTestNet:
case Coin.bitcoincash:
case Coin.namecoin:
case Coin.bitcoincashTestnet:
// case Coin.bitcoincash:
// case Coin.namecoin:
// case Coin.bitcoincashTestnet:
final client = ElectrumX(
host: node!.host,
port: node.port,

File diff suppressed because it is too large Load diff

View file

@ -8,8 +8,6 @@ import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
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/bitcoincash/bitcoincash_wallet.dart';
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
import 'package:stackwallet/services/transaction_notification_tracker.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/prefs.dart';
@ -99,25 +97,25 @@ abstract class CoinServiceAPI {
tracker: tracker,
);
case Coin.bitcoincash:
return BitcoinCashWallet(
walletId: walletId,
walletName: walletName,
coin: coin,
client: client,
cachedClient: cachedClient,
tracker: tracker,
);
case Coin.bitcoincashTestnet:
return BitcoinCashWallet(
walletId: walletId,
walletName: walletName,
coin: coin,
client: client,
cachedClient: cachedClient,
tracker: tracker,
);
// case Coin.bitcoincash:
// return BitcoinCashWallet(
// walletId: walletId,
// walletName: walletName,
// coin: coin,
// client: client,
// cachedClient: cachedClient,
// tracker: tracker,
// );
//
// case Coin.bitcoincashTestnet:
// return BitcoinCashWallet(
// walletId: walletId,
// walletName: walletName,
// coin: coin,
// client: client,
// cachedClient: cachedClient,
// tracker: tracker,
// );
case Coin.dogecoin:
return DogecoinWallet(
@ -145,15 +143,15 @@ abstract class CoinServiceAPI {
// tracker: tracker,
);
case Coin.namecoin:
return NamecoinWallet(
walletId: walletId,
walletName: walletName,
coin: coin,
tracker: tracker,
cachedClient: cachedClient,
client: client,
);
// case Coin.namecoin:
// return NamecoinWallet(
// walletId: walletId,
// walletName: walletName,
// coin: coin,
// tracker: tracker,
// cachedClient: cachedClient,
// client: client,
// );
case Coin.dogecoinTestNet:
return DogecoinWallet(

File diff suppressed because it is too large Load diff

View file

@ -5,8 +5,6 @@ import 'package:crypto/crypto.dart';
import 'package:flutter_libepiccash/epic_cash.dart';
import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart';
import 'package:stackwallet/services/coins/firo/firo_wallet.dart';
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart';
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/logger.dart';
@ -42,8 +40,8 @@ class AddressUtils {
switch (coin) {
case Coin.bitcoin:
return Address.validateAddress(address, bitcoin);
case Coin.bitcoincash:
return Address.validateAddress(address, bitcoincash);
// case Coin.bitcoincash:
// return Address.validateAddress(address, bitcoincash);
case Coin.dogecoin:
return Address.validateAddress(address, dogecoin);
case Coin.epicCash:
@ -53,12 +51,12 @@ class AddressUtils {
case Coin.monero:
return RegExp("[a-zA-Z0-9]{95}").hasMatch(address) ||
RegExp("[a-zA-Z0-9]{106}").hasMatch(address);
case Coin.namecoin:
return Address.validateAddress(address, namecoin);
// case Coin.namecoin:
// return Address.validateAddress(address, namecoin);
case Coin.bitcoinTestNet:
return Address.validateAddress(address, testnet);
case Coin.bitcoincashTestnet:
return Address.validateAddress(address, bitcoincashtestnet);
// case Coin.bitcoincashTestnet:
// return Address.validateAddress(address, bitcoincashtestnet);
case Coin.firoTestNet:
return Address.validateAddress(address, firoTestNetwork);
case Coin.dogecoinTestNet:

View file

@ -138,8 +138,8 @@ class _SVG {
switch (coin) {
case Coin.bitcoin:
return bitcoin;
case Coin.bitcoincash:
return bitcoincash;
// case Coin.bitcoincash:
// return bitcoincash;
case Coin.dogecoin:
return dogecoin;
case Coin.epicCash:
@ -148,12 +148,12 @@ class _SVG {
return firo;
case Coin.monero:
return monero;
case Coin.namecoin:
return namecoin;
// case Coin.namecoin:
// return namecoin;
case Coin.bitcoinTestNet:
return bitcoinTestnet;
case Coin.bitcoincashTestnet:
return bitcoincashTestnet;
// case Coin.bitcoincashTestnet:
// return bitcoincashTestnet;
case Coin.firoTestNet:
return firoTestnet;
case Coin.dogecoinTestNet:
@ -181,9 +181,9 @@ class _PNG {
case Coin.bitcoin:
case Coin.bitcoinTestNet:
return bitcoin;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return bitcoincash;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return bitcoincash;
case Coin.dogecoin:
case Coin.dogecoinTestNet:
return dogecoin;
@ -195,8 +195,8 @@ class _PNG {
return firo;
case Coin.monero:
return monero;
case Coin.namecoin:
return namecoin;
// case Coin.namecoin:
// return namecoin;
}
}
}

View file

@ -22,12 +22,12 @@ Uri getBlockExplorerTransactionUrlFor({
return Uri.parse("https://explorer.firo.org/tx/$txid");
case Coin.firoTestNet:
return Uri.parse("https://testexplorer.firo.org/tx/$txid");
case Coin.bitcoincash:
return Uri.parse("https://blockchair.com/bitcoin-cash/transaction/$txid");
case Coin.bitcoincashTestnet:
return Uri.parse(
"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.bitcoincash:
// return Uri.parse("https://blockchair.com/bitcoin-cash/transaction/$txid");
// case Coin.bitcoincashTestnet:
// return Uri.parse(
// "https://blockexplorer.one/bitcoin-cash/testnet/tx/$txid");
// case Coin.namecoin:
// return Uri.parse("https://chainz.cryptoid.info/nmc/tx.dws?$txid.htm");
}
}

View file

@ -39,14 +39,15 @@ abstract class Constants {
final List<int> values = [];
switch (coin) {
case Coin.bitcoin:
case Coin.bitcoincash:
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
case Coin.dogecoin:
case Coin.firo:
case Coin.bitcoinTestNet:
case Coin.dogecoinTestNet:
case Coin.firoTestNet:
case Coin.epicCash:
case Coin.namecoin:
// case Coin.namecoin:
values.addAll([24, 21, 18, 15, 12]);
break;
@ -64,9 +65,9 @@ abstract class Constants {
case Coin.bitcoinTestNet:
return 600;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return 600;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return 600;
case Coin.dogecoin:
case Coin.dogecoinTestNet:
@ -82,8 +83,8 @@ abstract class Constants {
case Coin.monero:
return 120;
case Coin.namecoin:
return 600;
// case Coin.namecoin:
// return 600;
}
}

View file

@ -13,9 +13,10 @@ abstract class DefaultNodes {
firo,
monero,
epicCash,
bitcoincash,
namecoin,
// bitcoincash,
// namecoin,
bitcoinTestnet,
// bitcoincashTestnet,
dogecoinTestnet,
firoTestnet,
];
@ -32,17 +33,17 @@ abstract class DefaultNodes {
isDown: false,
);
static NodeModel get bitcoincash => NodeModel(
host: "bitcoincash.stackwallet.com",
port: 50002,
name: defaultName,
id: _nodeId(Coin.bitcoincash),
useSSL: true,
enabled: true,
coinName: Coin.bitcoincash.name,
isFailover: true,
isDown: false,
);
// static NodeModel get bitcoincash => NodeModel(
// host: "bitcoincash.stackwallet.com",
// port: 50002,
// name: defaultName,
// id: _nodeId(Coin.bitcoincash),
// useSSL: true,
// enabled: true,
// coinName: Coin.bitcoincash.name,
// isFailover: true,
// isDown: false,
// );
static NodeModel get dogecoin => NodeModel(
host: "dogecoin.stackwallet.com",
@ -94,17 +95,17 @@ abstract class DefaultNodes {
isDown: false,
);
static NodeModel get namecoin => NodeModel(
host: "namecoin.stackwallet.com",
port: 57002,
name: defaultName,
id: _nodeId(Coin.namecoin),
useSSL: true,
enabled: true,
coinName: Coin.namecoin.name,
isFailover: true,
isDown: false,
);
// static NodeModel get namecoin => NodeModel(
// host: "namecoin.stackwallet.com",
// port: 57002,
// name: defaultName,
// id: _nodeId(Coin.namecoin),
// useSSL: true,
// enabled: true,
// coinName: Coin.namecoin.name,
// isFailover: true,
// isDown: false,
// );
static NodeModel get bitcoinTestnet => NodeModel(
host: "electrumx-testnet.cypherstack.com",
@ -142,25 +143,25 @@ abstract class DefaultNodes {
isDown: false,
);
static NodeModel get bitcoincashTestnet => NodeModel(
host: "testnet.hsmiths.com",
port: 53012,
name: defaultName,
id: _nodeId(Coin.bitcoincash),
useSSL: true,
enabled: true,
coinName: Coin.bitcoincash.name,
isFailover: true,
isDown: false,
);
// static NodeModel get bitcoincashTestnet => NodeModel(
// host: "testnet.hsmiths.com",
// port: 53012,
// name: defaultName,
// id: _nodeId(Coin.bitcoincash),
// useSSL: true,
// enabled: true,
// coinName: Coin.bitcoincash.name,
// isFailover: true,
// isDown: false,
// );
static NodeModel getNodeFor(Coin coin) {
switch (coin) {
case Coin.bitcoin:
return bitcoin;
case Coin.bitcoincash:
return bitcoincash;
//
// case Coin.bitcoincash:
// return bitcoincash;
case Coin.dogecoin:
return dogecoin;
@ -174,14 +175,14 @@ abstract class DefaultNodes {
case Coin.monero:
return monero;
case Coin.namecoin:
return namecoin;
// case Coin.namecoin:
// return namecoin;
case Coin.bitcoinTestNet:
return bitcoinTestnet;
case Coin.bitcoincashTestnet:
return bitcoincashTestnet;
// case Coin.bitcoincashTestnet:
// return bitcoincashTestnet;
case Coin.firoTestNet:
return firoTestnet;

View file

@ -1,44 +1,40 @@
import 'package:stackwallet/services/coins/bitcoin/bitcoin_wallet.dart' as btc;
import 'package:stackwallet/services/coins/bitcoincash/bitcoincash_wallet.dart'
as bch;
import 'package:stackwallet/services/coins/dogecoin/dogecoin_wallet.dart'
as doge;
import 'package:stackwallet/services/coins/epiccash/epiccash_wallet.dart'
as epic;
import 'package:stackwallet/services/coins/firo/firo_wallet.dart' as firo;
import 'package:stackwallet/services/coins/monero/monero_wallet.dart' as xmr;
import 'package:stackwallet/services/coins/namecoin/namecoin_wallet.dart'
as nmc;
enum Coin {
bitcoin,
bitcoincash,
// bitcoincash,
dogecoin,
epicCash,
firo,
monero,
namecoin,
// namecoin,
///
///
///
bitcoinTestNet,
bitcoincashTestnet,
// bitcoincashTestnet,
dogecoinTestNet,
firoTestNet,
}
// remove firotestnet for now
const int kTestNetCoinCount = 3;
const int kTestNetCoinCount = 2;
extension CoinExt on Coin {
String get prettyName {
switch (this) {
case Coin.bitcoin:
return "Bitcoin";
case Coin.bitcoincash:
return "Bitcoin Cash";
// case Coin.bitcoincash:
// return "Bitcoin Cash";
case Coin.dogecoin:
return "Dogecoin";
case Coin.epicCash:
@ -47,12 +43,12 @@ extension CoinExt on Coin {
return "Firo";
case Coin.monero:
return "Monero";
case Coin.namecoin:
return "Namecoin";
// case Coin.namecoin:
// return "Namecoin";
case Coin.bitcoinTestNet:
return "tBitcoin";
case Coin.bitcoincashTestnet:
return "tBitcoin Cash";
// case Coin.bitcoincashTestnet:
// return "tBitcoin Cash";
case Coin.firoTestNet:
return "tFiro";
case Coin.dogecoinTestNet:
@ -64,8 +60,8 @@ extension CoinExt on Coin {
switch (this) {
case Coin.bitcoin:
return "BTC";
case Coin.bitcoincash:
return "BCH";
// case Coin.bitcoincash:
// return "BCH";
case Coin.dogecoin:
return "DOGE";
case Coin.epicCash:
@ -74,12 +70,12 @@ extension CoinExt on Coin {
return "FIRO";
case Coin.monero:
return "XMR";
case Coin.namecoin:
return "NMC";
// case Coin.namecoin:
// return "NMC";
case Coin.bitcoinTestNet:
return "tBTC";
case Coin.bitcoincashTestnet:
return "tBCH";
// case Coin.bitcoincashTestnet:
// return "tBCH";
case Coin.firoTestNet:
return "tFIRO";
case Coin.dogecoinTestNet:
@ -91,8 +87,8 @@ extension CoinExt on Coin {
switch (this) {
case Coin.bitcoin:
return "bitcoin";
case Coin.bitcoincash:
return "bitcoincash";
// case Coin.bitcoincash:
// return "bitcoincash";
case Coin.dogecoin:
return "dogecoin";
case Coin.epicCash:
@ -102,12 +98,12 @@ extension CoinExt on Coin {
return "firo";
case Coin.monero:
return "monero";
case Coin.namecoin:
return "namecoin";
// case Coin.namecoin:
// return "namecoin";
case Coin.bitcoinTestNet:
return "bitcoin";
case Coin.bitcoincashTestnet:
return "bitcoincash";
// case Coin.bitcoincashTestnet:
// return "bitcoincash";
case Coin.firoTestNet:
return "firo";
case Coin.dogecoinTestNet:
@ -118,12 +114,12 @@ extension CoinExt on Coin {
bool get isElectrumXCoin {
switch (this) {
case Coin.bitcoin:
case Coin.bitcoincash:
// case Coin.bitcoincash:
case Coin.dogecoin:
case Coin.firo:
case Coin.namecoin:
// case Coin.namecoin:
case Coin.bitcoinTestNet:
case Coin.bitcoincashTestnet:
// case Coin.bitcoincashTestnet:
case Coin.firoTestNet:
case Coin.dogecoinTestNet:
return true;
@ -140,9 +136,9 @@ extension CoinExt on Coin {
case Coin.bitcoinTestNet:
return btc.MINIMUM_CONFIRMATIONS;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return bch.MINIMUM_CONFIRMATIONS;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return bch.MINIMUM_CONFIRMATIONS;
case Coin.firo:
case Coin.firoTestNet:
@ -157,8 +153,8 @@ extension CoinExt on Coin {
case Coin.monero:
return xmr.MINIMUM_CONFIRMATIONS;
case Coin.namecoin:
return nmc.MINIMUM_CONFIRMATIONS;
// case Coin.namecoin:
// return nmc.MINIMUM_CONFIRMATIONS;
}
}
}
@ -168,10 +164,10 @@ Coin coinFromPrettyName(String name) {
case "Bitcoin":
case "bitcoin":
return Coin.bitcoin;
case "Bitcoincash":
case "bitcoincash":
case "Bitcoin Cash":
return Coin.bitcoincash;
// case "Bitcoincash":
// case "bitcoincash":
// case "Bitcoin Cash":
// return Coin.bitcoincash;
case "Dogecoin":
case "dogecoin":
return Coin.dogecoin;
@ -184,18 +180,18 @@ Coin coinFromPrettyName(String name) {
case "Monero":
case "monero":
return Coin.monero;
case "Namecoin":
case "namecoin":
return Coin.namecoin;
// case "Namecoin":
// case "namecoin":
// return Coin.namecoin;
case "Bitcoin Testnet":
case "tBitcoin":
case "bitcoinTestNet":
return Coin.bitcoinTestNet;
case "Bitcoincash Testnet":
case "tBitcoin Cash":
case "Bitcoin Cash Testnet":
return Coin.bitcoincashTestnet;
// case "Bitcoincash Testnet":
// case "tBitcoin Cash":
// case "Bitcoin Cash Testnet":
// return Coin.bitcoincashTestnet;
case "Firo Testnet":
case "tFiro":
case "firoTestNet":
@ -214,8 +210,8 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
switch (ticker.toLowerCase()) {
case "btc":
return Coin.bitcoin;
case "bch":
return Coin.bitcoincash;
// case "bch":
// return Coin.bitcoincash;
case "doge":
return Coin.dogecoin;
case "epic":
@ -224,12 +220,12 @@ Coin coinFromTickerCaseInsensitive(String ticker) {
return Coin.firo;
case "xmr":
return Coin.monero;
case "nmc":
return Coin.namecoin;
// case "nmc":
// return Coin.namecoin;
case "tbtc":
return Coin.bitcoinTestNet;
case "tbch":
return Coin.bitcoincashTestnet;
// case "tbch":
// return Coin.bitcoincashTestnet;
case "tfiro":
return Coin.firoTestNet;
case "tdoge":

View file

@ -190,9 +190,9 @@ class CoinThemeColor {
case Coin.bitcoin:
case Coin.bitcoinTestNet:
return bitcoin;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return bitcoincash;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return bitcoincash;
case Coin.dogecoin:
case Coin.dogecoinTestNet:
return dogecoin;
@ -203,8 +203,8 @@ class CoinThemeColor {
return firo;
case Coin.monero:
return monero;
case Coin.namecoin:
return namecoin;
// case Coin.namecoin:
// return namecoin;
// case Coin.wownero:
// return wownero;
}

View file

@ -1378,9 +1378,9 @@ class StackColors extends ThemeExtension<StackColors> {
case Coin.bitcoin:
case Coin.bitcoinTestNet:
return _coin.bitcoin;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return _coin.bitcoincash;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return _coin.bitcoincash;
case Coin.dogecoin:
case Coin.dogecoinTestNet:
return _coin.dogecoin;
@ -1391,8 +1391,8 @@ class StackColors extends ThemeExtension<StackColors> {
return _coin.firo;
case Coin.monero:
return _coin.monero;
case Coin.namecoin:
return _coin.namecoin;
// case Coin.namecoin:
// return _coin.namecoin;
// case Coin.wownero:
// return wownero;
}

View file

@ -1,120 +1,120 @@
import 'package:flutter/material.dart';
import 'package:stackwallet/models/exchange/change_now/exchange_transaction_status.dart';
import 'package:stackwallet/utilities/enums/coin_enum.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/dark_colors.dart';
import 'package:stackwallet/utilities/theme/light_colors.dart';
class StackTheme {
StackTheme._();
static final StackTheme _instance = StackTheme._();
static StackTheme get instance => _instance;
late StackColorTheme color;
late ThemeType theme;
void setTheme(ThemeType theme) {
this.theme = theme;
switch (theme) {
case ThemeType.light:
color = LightColors();
break;
case ThemeType.dark:
color = DarkColors();
break;
}
}
BoxShadow get standardBoxShadow => BoxShadow(
color: color.shadow,
spreadRadius: 3,
blurRadius: 4,
);
Color colorForCoin(Coin coin) {
switch (coin) {
case Coin.bitcoin:
case Coin.bitcoinTestNet:
return _coin.bitcoin;
case Coin.bitcoincash:
case Coin.bitcoincashTestnet:
return _coin.bitcoincash;
case Coin.dogecoin:
case Coin.dogecoinTestNet:
return _coin.dogecoin;
case Coin.epicCash:
return _coin.epicCash;
case Coin.firo:
case Coin.firoTestNet:
return _coin.firo;
case Coin.monero:
return _coin.monero;
case Coin.namecoin:
return _coin.namecoin;
// case Coin.wownero:
// return wownero;
}
}
Color colorForStatus(ChangeNowTransactionStatus status) {
switch (status) {
case ChangeNowTransactionStatus.New:
case ChangeNowTransactionStatus.Waiting:
case ChangeNowTransactionStatus.Confirming:
case ChangeNowTransactionStatus.Exchanging:
case ChangeNowTransactionStatus.Sending:
case ChangeNowTransactionStatus.Verifying:
return const Color(0xFFD3A90F);
case ChangeNowTransactionStatus.Finished:
return color.accentColorGreen;
case ChangeNowTransactionStatus.Failed:
return color.accentColorRed;
case ChangeNowTransactionStatus.Refunded:
return color.textSubtitle2;
}
}
ButtonStyle? getPrimaryEnabledButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.buttonBackPrimary,
),
);
ButtonStyle? getPrimaryDisabledButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.buttonBackPrimaryDisabled,
),
);
ButtonStyle? getSecondaryEnabledButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.buttonBackSecondary,
),
);
ButtonStyle? getSmallSecondaryEnabledButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.textFieldDefaultBG,
),
);
ButtonStyle? getDesktopMenuButtonColor(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.popupBG,
),
);
ButtonStyle? getDesktopMenuButtonColorSelected(BuildContext context) =>
Theme.of(context).textButtonTheme.style?.copyWith(
backgroundColor: MaterialStateProperty.all<Color>(
color.textFieldDefaultBG,
),
);
static const _coin = CoinThemeColor();
}
// import 'package:flutter/material.dart';
// import 'package:stackwallet/models/exchange/change_now/exchange_transaction_status.dart';
// import 'package:stackwallet/utilities/enums/coin_enum.dart';
// import 'package:stackwallet/utilities/theme/color_theme.dart';
// import 'package:stackwallet/utilities/theme/dark_colors.dart';
// import 'package:stackwallet/utilities/theme/light_colors.dart';
//
// class StackTheme {
// StackTheme._();
// static final StackTheme _instance = StackTheme._();
// static StackTheme get instance => _instance;
//
// late StackColorTheme color;
// late ThemeType theme;
//
// void setTheme(ThemeType theme) {
// this.theme = theme;
// switch (theme) {
// case ThemeType.light:
// color = LightColors();
// break;
// case ThemeType.dark:
// color = DarkColors();
// break;
// }
// }
//
// BoxShadow get standardBoxShadow => BoxShadow(
// color: color.shadow,
// spreadRadius: 3,
// blurRadius: 4,
// );
//
// Color colorForCoin(Coin coin) {
// switch (coin) {
// case Coin.bitcoin:
// case Coin.bitcoinTestNet:
// return _coin.bitcoin;
// case Coin.bitcoincash:
// case Coin.bitcoincashTestnet:
// return _coin.bitcoincash;
// case Coin.dogecoin:
// case Coin.dogecoinTestNet:
// return _coin.dogecoin;
// case Coin.epicCash:
// return _coin.epicCash;
// case Coin.firo:
// case Coin.firoTestNet:
// return _coin.firo;
// case Coin.monero:
// return _coin.monero;
// case Coin.namecoin:
// return _coin.namecoin;
// // case Coin.wownero:
// // return wownero;
// }
// }
//
// Color colorForStatus(ChangeNowTransactionStatus status) {
// switch (status) {
// case ChangeNowTransactionStatus.New:
// case ChangeNowTransactionStatus.Waiting:
// case ChangeNowTransactionStatus.Confirming:
// case ChangeNowTransactionStatus.Exchanging:
// case ChangeNowTransactionStatus.Sending:
// case ChangeNowTransactionStatus.Verifying:
// return const Color(0xFFD3A90F);
// case ChangeNowTransactionStatus.Finished:
// return color.accentColorGreen;
// case ChangeNowTransactionStatus.Failed:
// return color.accentColorRed;
// case ChangeNowTransactionStatus.Refunded:
// return color.textSubtitle2;
// }
// }
//
// ButtonStyle? getPrimaryEnabledButtonColor(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.buttonBackPrimary,
// ),
// );
//
// ButtonStyle? getPrimaryDisabledButtonColor(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.buttonBackPrimaryDisabled,
// ),
// );
//
// ButtonStyle? getSecondaryEnabledButtonColor(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.buttonBackSecondary,
// ),
// );
//
// ButtonStyle? getSmallSecondaryEnabledButtonColor(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.textFieldDefaultBG,
// ),
// );
//
// ButtonStyle? getDesktopMenuButtonColor(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.popupBG,
// ),
// );
//
// ButtonStyle? getDesktopMenuButtonColorSelected(BuildContext context) =>
// Theme.of(context).textButtonTheme.style?.copyWith(
// backgroundColor: MaterialStateProperty.all<Color>(
// color.textFieldDefaultBG,
// ),
// );
//
// static const _coin = CoinThemeColor();
// }

View file

@ -106,9 +106,9 @@ class NodeOptionsSheet extends ConsumerWidget {
case Coin.bitcoinTestNet:
case Coin.firoTestNet:
case Coin.dogecoinTestNet:
case Coin.bitcoincash:
case Coin.namecoin:
case Coin.bitcoincashTestnet:
// case Coin.bitcoincash:
// case Coin.namecoin:
// case Coin.bitcoincashTestnet:
final client = ElectrumX(
host: node.host,
port: node.port,

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,11 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_theme.dart';
import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart';
void main() {
StackTheme.instance.setTheme(ThemeType.light);
testWidgets("AppBarIconButton test", (tester) async {
int buttonPressedCount = 0;
final button = AppBarIconButton(

View file

@ -1,11 +1,8 @@
import 'package:flutter/material.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_theme.dart';
import 'package:stackwallet/widgets/custom_buttons/draggable_switch_button.dart';
void main() {
StackTheme.instance.setTheme(ThemeType.light);
testWidgets("DraggableSwitchButton tapped", (tester) async {
bool? isButtonOn = false;
final button = DraggableSwitchButton(

View file

@ -1,13 +1,10 @@
import 'package:flutter/material.dart';
import 'package:flutter_svg/svg.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:stackwallet/utilities/theme/color_theme.dart';
import 'package:stackwallet/utilities/theme/stack_theme.dart';
import 'package:stackwallet/widgets/custom_pin_put/custom_pin_put.dart';
import 'package:stackwallet/widgets/custom_pin_put/pin_keyboard.dart';
void main() {
StackTheme.instance.setTheme(ThemeType.light);
group("CustomPinPut tests", () {
testWidgets("CustomPinPut with 4 fields builds correctly", (tester) async {
const pinPut = CustomPinPut(fieldsCount: 4);