mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
Merge branch 'ui-fixes' into add-ecash
This commit is contained in:
commit
9a6dcba631
11 changed files with 94 additions and 33 deletions
BIN
assets/images/chan-persona-easy.png
Normal file
BIN
assets/images/chan-persona-easy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 493 KiB |
BIN
assets/images/chan-persona-incognito.png
Normal file
BIN
assets/images/chan-persona-incognito.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 480 KiB |
|
@ -186,7 +186,10 @@ class _SendViewState extends ConsumerState<SendView> {
|
||||||
late Amount _currentFee;
|
late Amount _currentFee;
|
||||||
|
|
||||||
void _setCurrentFee(String fee, bool shouldSetState) {
|
void _setCurrentFee(String fee, bool shouldSetState) {
|
||||||
final value = Decimal.parse(fee).toAmount(fractionDigits: coin.decimals);
|
final value = fee.contains(",")
|
||||||
|
? Decimal.parse(fee.replaceFirst(",", "."))
|
||||||
|
.toAmount(fractionDigits: coin.decimals)
|
||||||
|
: Decimal.parse(fee).toAmount(fractionDigits: coin.decimals);
|
||||||
|
|
||||||
if (shouldSetState) {
|
if (shouldSetState) {
|
||||||
setState(() => _currentFee = value);
|
setState(() => _currentFee = value);
|
||||||
|
|
|
@ -8,10 +8,12 @@ import 'package:stackwallet/pages/pinpad_views/create_pin_view.dart';
|
||||||
import 'package:stackwallet/pages_desktop_specific/password/create_password_view.dart';
|
import 'package:stackwallet/pages_desktop_specific/password/create_password_view.dart';
|
||||||
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||||
import 'package:stackwallet/providers/global/price_provider.dart';
|
import 'package:stackwallet/providers/global/price_provider.dart';
|
||||||
|
import 'package:stackwallet/providers/ui/color_theme_provider.dart';
|
||||||
import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart';
|
import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/conditional_parent.dart';
|
import 'package:stackwallet/widgets/conditional_parent.dart';
|
||||||
|
@ -308,6 +310,10 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final bool lightChan =
|
||||||
|
ref.read(colorThemeProvider.state).state.themeType == ThemeType.chan;
|
||||||
|
final bool darkChan = ref.read(colorThemeProvider.state).state.themeType ==
|
||||||
|
ThemeType.darkChans;
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -344,19 +350,15 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
Column(
|
Column(
|
||||||
crossAxisAlignment: CrossAxisAlignment.stretch,
|
crossAxisAlignment: CrossAxisAlignment.stretch,
|
||||||
children: [
|
children: [
|
||||||
// if (isDesktop)
|
(lightChan || darkChan)
|
||||||
// const SizedBox(
|
? Image(
|
||||||
// height: 10,
|
image: AssetImage(Assets.png.chanEasy),
|
||||||
// ),
|
)
|
||||||
SvgPicture.asset(
|
: SvgPicture.asset(
|
||||||
Assets.svg.personaEasy(context),
|
Assets.svg.personaEasy(context),
|
||||||
width: 140,
|
width: 140,
|
||||||
height: 140,
|
height: 140,
|
||||||
),
|
),
|
||||||
// if (isDesktop)
|
|
||||||
// const SizedBox(
|
|
||||||
// height: 12,
|
|
||||||
// ),
|
|
||||||
Center(
|
Center(
|
||||||
child: Text(
|
child: Text(
|
||||||
"Easy Crypto",
|
"Easy Crypto",
|
||||||
|
@ -453,11 +455,20 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
SvgPicture.asset(
|
(lightChan || darkChan)
|
||||||
Assets.svg.personaIncognito(context),
|
? Image(
|
||||||
width: 140,
|
image: AssetImage(Assets.png.chanIncognito),
|
||||||
height: 140,
|
)
|
||||||
),
|
: SvgPicture.asset(
|
||||||
|
Assets.svg.personaIncognito(context),
|
||||||
|
width: 140,
|
||||||
|
height: 140,
|
||||||
|
),
|
||||||
|
// SvgPicture.asset(
|
||||||
|
// Assets.svg.personaIncognito(context),
|
||||||
|
// width: 140,
|
||||||
|
// height: 140,
|
||||||
|
// ),
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
|
|
@ -310,7 +310,12 @@ class _DesktopWalletFeaturesState extends ConsumerState<DesktopWalletFeatures> {
|
||||||
);
|
);
|
||||||
|
|
||||||
final showMore = manager.hasPaynymSupport ||
|
final showMore = manager.hasPaynymSupport ||
|
||||||
manager.hasCoinControlSupport ||
|
(manager.hasCoinControlSupport &&
|
||||||
|
ref.watch(
|
||||||
|
prefsChangeNotifierProvider.select(
|
||||||
|
(value) => value.enableCoinControl,
|
||||||
|
),
|
||||||
|
)) ||
|
||||||
manager.coin == Coin.firo ||
|
manager.coin == Coin.firo ||
|
||||||
manager.coin == Coin.firoTestNet ||
|
manager.coin == Coin.firoTestNet ||
|
||||||
manager.hasWhirlpoolSupport;
|
manager.hasWhirlpoolSupport;
|
||||||
|
|
|
@ -6,10 +6,12 @@ import 'package:flutter_svg/svg.dart';
|
||||||
import 'package:stackwallet/db/hive/db.dart';
|
import 'package:stackwallet/db/hive/db.dart';
|
||||||
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
import 'package:stackwallet/providers/global/prefs_provider.dart';
|
||||||
import 'package:stackwallet/providers/global/price_provider.dart';
|
import 'package:stackwallet/providers/global/price_provider.dart';
|
||||||
|
import 'package:stackwallet/providers/ui/color_theme_provider.dart';
|
||||||
import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart';
|
import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart';
|
||||||
import 'package:stackwallet/utilities/assets.dart';
|
import 'package:stackwallet/utilities/assets.dart';
|
||||||
import 'package:stackwallet/utilities/constants.dart';
|
import 'package:stackwallet/utilities/constants.dart';
|
||||||
import 'package:stackwallet/utilities/text_styles.dart';
|
import 'package:stackwallet/utilities/text_styles.dart';
|
||||||
|
import 'package:stackwallet/utilities/theme/color_theme.dart';
|
||||||
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
import 'package:stackwallet/utilities/theme/stack_colors.dart';
|
||||||
import 'package:stackwallet/utilities/util.dart';
|
import 'package:stackwallet/utilities/util.dart';
|
||||||
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
import 'package:stackwallet/widgets/desktop/desktop_dialog.dart';
|
||||||
|
@ -224,6 +226,10 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
|
|
||||||
@override
|
@override
|
||||||
Widget build(BuildContext context) {
|
Widget build(BuildContext context) {
|
||||||
|
final bool lightChan =
|
||||||
|
ref.read(colorThemeProvider.state).state.themeType == ThemeType.chan;
|
||||||
|
final bool darkChan = ref.read(colorThemeProvider.state).state.themeType ==
|
||||||
|
ThemeType.darkChans;
|
||||||
return Row(
|
return Row(
|
||||||
children: [
|
children: [
|
||||||
Expanded(
|
Expanded(
|
||||||
|
@ -265,11 +271,20 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
SvgPicture.asset(
|
//
|
||||||
Assets.svg.personaEasy(context),
|
(lightChan || darkChan)
|
||||||
width: 120,
|
? Image(
|
||||||
height: 120,
|
image: AssetImage(
|
||||||
),
|
Assets.png.chanEasy,
|
||||||
|
),
|
||||||
|
width: 120,
|
||||||
|
height: 120,
|
||||||
|
)
|
||||||
|
: SvgPicture.asset(
|
||||||
|
Assets.svg.personaEasy(context),
|
||||||
|
width: 120,
|
||||||
|
height: 120,
|
||||||
|
),
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
@ -371,11 +386,22 @@ class _PrivacyToggleState extends ConsumerState<PrivacyToggle> {
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 10,
|
height: 10,
|
||||||
),
|
),
|
||||||
SvgPicture.asset(
|
(lightChan || darkChan)
|
||||||
Assets.svg.personaIncognito(context),
|
? Image(
|
||||||
width: 120,
|
image: AssetImage(Assets.png.chanIncognito),
|
||||||
height: 120,
|
width: 120,
|
||||||
),
|
height: 120,
|
||||||
|
)
|
||||||
|
: SvgPicture.asset(
|
||||||
|
Assets.svg.personaIncognito(context),
|
||||||
|
width: 120,
|
||||||
|
height: 120,
|
||||||
|
),
|
||||||
|
// SvgPicture.asset(
|
||||||
|
// Assets.svg.personaIncognito(context),
|
||||||
|
// width: 120,
|
||||||
|
// height: 120,
|
||||||
|
// ),
|
||||||
if (isDesktop)
|
if (isDesktop)
|
||||||
const SizedBox(
|
const SizedBox(
|
||||||
height: 12,
|
height: 12,
|
||||||
|
|
|
@ -2413,7 +2413,15 @@ class BitcoinCashWallet extends CoinServiceAPI
|
||||||
// don't care about sorting if using all utxos
|
// don't care about sorting if using all utxos
|
||||||
if (!coinControl) {
|
if (!coinControl) {
|
||||||
// sort spendable by age (oldest first)
|
// sort spendable by age (oldest first)
|
||||||
spendableOutputs.sort((a, b) => b.blockTime!.compareTo(a.blockTime!));
|
spendableOutputs.sort((a, b) {
|
||||||
|
if (a.blockTime != null && b.blockTime != null) {
|
||||||
|
return b.blockTime!.compareTo(a.blockTime!);
|
||||||
|
} else if (a.blockTime != null) {
|
||||||
|
return -1;
|
||||||
|
} else {
|
||||||
|
return 1;
|
||||||
|
}
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Logging.instance.log("spendableOutputs.length: ${spendableOutputs.length}",
|
Logging.instance.log("spendableOutputs.length: ${spendableOutputs.length}",
|
||||||
|
|
|
@ -50,7 +50,7 @@ import 'package:stackwallet/utilities/prefs.dart';
|
||||||
import 'package:stackwallet/utilities/stack_file_system.dart';
|
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||||
import 'package:tuple/tuple.dart';
|
import 'package:tuple/tuple.dart';
|
||||||
|
|
||||||
const int MINIMUM_CONFIRMATIONS = 10;
|
const int MINIMUM_CONFIRMATIONS = 4;
|
||||||
|
|
||||||
class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
class WowneroWallet extends CoinServiceAPI with WalletCache, WalletDB {
|
||||||
WowneroWallet({
|
WowneroWallet({
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
import 'dart:io';
|
import 'dart:io';
|
||||||
|
|
||||||
import 'package:devicelocale/devicelocale.dart';
|
import 'package:devicelocale/devicelocale.dart';
|
||||||
import 'package:flutter/material.dart';
|
import 'package:flutter/material.dart';
|
||||||
|
|
||||||
|
@ -8,7 +9,9 @@ class LocaleService extends ChangeNotifier {
|
||||||
String get locale => _locale;
|
String get locale => _locale;
|
||||||
|
|
||||||
Future<void> loadLocale({bool notify = true}) async {
|
Future<void> loadLocale({bool notify = true}) async {
|
||||||
_locale =Platform.isWindows ? "en_US" : await Devicelocale.currentLocale ?? "en_US";
|
_locale = Platform.isWindows
|
||||||
|
? "en_US"
|
||||||
|
: await Devicelocale.currentLocale ?? "en_US";
|
||||||
if (notify) {
|
if (notify) {
|
||||||
notifyListeners();
|
notifyListeners();
|
||||||
}
|
}
|
||||||
|
|
|
@ -410,6 +410,9 @@ class _PNG {
|
||||||
|
|
||||||
String get glasses => "assets/images/glasses.png";
|
String get glasses => "assets/images/glasses.png";
|
||||||
String get glassesHidden => "assets/images/glasses-hidden.png";
|
String get glassesHidden => "assets/images/glasses-hidden.png";
|
||||||
|
|
||||||
|
String get chanEasy => "assets/images/chan-persona-easy.png";
|
||||||
|
String get chanIncognito => "assets/images/chan-persona-incognito.png";
|
||||||
}
|
}
|
||||||
|
|
||||||
class _ANIMATIONS {
|
class _ANIMATIONS {
|
||||||
|
|
|
@ -211,6 +211,8 @@ flutter:
|
||||||
# - images/a_dot_burr.jpeg
|
# - images/a_dot_burr.jpeg
|
||||||
# - images/a_dot_ham.jpeg
|
# - images/a_dot_ham.jpeg
|
||||||
assets:
|
assets:
|
||||||
|
- assets/images/chan-persona-incognito.png
|
||||||
|
- assets/images/chan-persona-easy.png
|
||||||
- assets/images/splash.png
|
- assets/images/splash.png
|
||||||
- assets/icon/icon.png
|
- assets/icon/icon.png
|
||||||
- google_fonts/
|
- google_fonts/
|
||||||
|
|
Loading…
Reference in a new issue