diff --git a/ios/Runner.xcodeproj/project.pbxproj b/ios/Runner.xcodeproj/project.pbxproj index c76f92b0e..ec3100f8e 100644 --- a/ios/Runner.xcodeproj/project.pbxproj +++ b/ios/Runner.xcodeproj/project.pbxproj @@ -451,7 +451,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 75; + CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -505,7 +505,7 @@ "$(PROJECT_DIR)/../crypto_plugins/flutter_libmonero/cw_shared_external/ios/External/ios/**", "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); - MARKETING_VERSION = 1.5.5; + MARKETING_VERSION = 1.5.8; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -635,7 +635,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 75; + CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -689,7 +689,7 @@ "$(PROJECT_DIR)/../crypto_plugins/flutter_libmonero/cw_shared_external/ios/External/ios/**", "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); - MARKETING_VERSION = 1.5.5; + MARKETING_VERSION = 1.5.8; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -711,7 +711,7 @@ buildSettings = { ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; CLANG_ENABLE_MODULES = YES; - CURRENT_PROJECT_VERSION = 75; + CURRENT_PROJECT_VERSION = 78; DEVELOPMENT_TEAM = 4DQKUWSG6C; ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( @@ -765,7 +765,7 @@ "$(PROJECT_DIR)/../crypto_plugins/flutter_libmonero/cw_shared_external/ios/External/ios/**", "$(PROJECT_DIR)/../crypto_plugins/flutter_libepiccash/ios/libs", ); - MARKETING_VERSION = 1.5.5; + MARKETING_VERSION = 1.5.8; ONLY_ACTIVE_ARCH = NO; PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stackwallet; PRODUCT_NAME = "$(TARGET_NAME)"; diff --git a/lib/main.dart b/lib/main.dart index 04c48ae49..ad1ef9b7f 100644 --- a/lib/main.dart +++ b/lib/main.dart @@ -207,6 +207,7 @@ class _MaterialAppWithThemeState extends ConsumerState didLoad = true; await DB.instance.init(); + await _prefs.init(); _notificationsService = ref.read(notificationsProvider); _nodeService = ref.read(nodeServiceChangeNotifierProvider); @@ -223,7 +224,6 @@ class _MaterialAppWithThemeState extends ConsumerState tradesService: _tradesService, prefs: _prefs, ); - await _prefs.init(); ref.read(priceAnd24hChangeNotifierProvider).start(true); await _wallets.load(_prefs); loadingCompleter.complete(); diff --git a/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart b/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart index 20d39f986..2113e199c 100644 --- a/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart +++ b/lib/pages/exchange_view/sub_widgets/exchange_provider_options.dart @@ -5,6 +5,7 @@ import 'package:flutter_svg/svg.dart'; import 'package:stackwallet/models/exchange/response_objects/estimate.dart'; import 'package:stackwallet/providers/providers.dart'; import 'package:stackwallet/services/exchange/change_now/change_now_exchange.dart'; +import 'package:stackwallet/services/exchange/exchange.dart'; import 'package:stackwallet/services/exchange/exchange_response.dart'; import 'package:stackwallet/services/exchange/simpleswap/simpleswap_exchange.dart'; import 'package:stackwallet/utilities/assets.dart'; @@ -46,6 +47,9 @@ class ExchangeProviderOptions extends ConsumerWidget { ChangeNowExchange.exchangeName) { ref.read(currentExchangeNameStateProvider.state).state = ChangeNowExchange.exchangeName; + ref.read(exchangeFormStateProvider).exchange = + Exchange.fromName( + ref.read(currentExchangeNameStateProvider.state).state); } }, child: Container( @@ -69,6 +73,10 @@ class ExchangeProviderOptions extends ConsumerWidget { ref .read(currentExchangeNameStateProvider.state) .state = value; + ref.read(exchangeFormStateProvider).exchange = + Exchange.fromName(ref + .read(currentExchangeNameStateProvider.state) + .state); } }, ), @@ -214,6 +222,9 @@ class ExchangeProviderOptions extends ConsumerWidget { SimpleSwapExchange.exchangeName) { ref.read(currentExchangeNameStateProvider.state).state = SimpleSwapExchange.exchangeName; + ref.read(exchangeFormStateProvider).exchange = + Exchange.fromName( + ref.read(currentExchangeNameStateProvider.state).state); } }, child: Container( @@ -237,6 +248,10 @@ class ExchangeProviderOptions extends ConsumerWidget { ref .read(currentExchangeNameStateProvider.state) .state = value; + ref.read(exchangeFormStateProvider).exchange = + Exchange.fromName(ref + .read(currentExchangeNameStateProvider.state) + .state); } }, ), diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index bba561ead..76c845027 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -79,23 +79,25 @@ class _TradeDetailsViewState extends ConsumerState { transactionIfSentFromStack = widget.transactionIfSentFromStack; walletId = widget.walletId; - WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { - final trade = ref - .read(tradesServiceProvider) - .trades - .firstWhere((e) => e.tradeId == tradeId); + if (ref.read(prefsChangeNotifierProvider).externalCalls) { + WidgetsBinding.instance.addPostFrameCallback((timeStamp) async { + final trade = ref + .read(tradesServiceProvider) + .trades + .firstWhere((e) => e.tradeId == tradeId); - if (mounted) { - final exchange = Exchange.fromName(trade.exchangeName); - final response = await exchange.updateTrade(trade); + if (mounted) { + final exchange = Exchange.fromName(trade.exchangeName); + final response = await exchange.updateTrade(trade); - if (mounted && response.value != null) { - await ref - .read(tradesServiceProvider) - .edit(trade: response.value!, shouldNotifyListeners: true); + if (mounted && response.value != null) { + await ref + .read(tradesServiceProvider) + .edit(trade: response.value!, shouldNotifyListeners: true); + } } - } - }); + }); + } super.initState(); } diff --git a/lib/pages/home_view/home_view.dart b/lib/pages/home_view/home_view.dart index 2e7c38202..33744570b 100644 --- a/lib/pages/home_view/home_view.dart +++ b/lib/pages/home_view/home_view.dart @@ -11,13 +11,13 @@ import 'package:stackwallet/pages/settings_views/global_settings_view/global_set import 'package:stackwallet/pages/settings_views/global_settings_view/hidden_settings.dart'; import 'package:stackwallet/pages/wallets_view/wallets_view.dart'; import 'package:stackwallet/providers/global/notifications_provider.dart'; +import 'package:stackwallet/providers/global/prefs_provider.dart'; import 'package:stackwallet/providers/ui/home_view_index_provider.dart'; import 'package:stackwallet/providers/ui/unread_notifications_provider.dart'; import 'package:stackwallet/services/exchange/exchange_data_loading_service.dart'; import 'package:stackwallet/utilities/assets.dart'; import 'package:stackwallet/utilities/constants.dart'; import 'package:stackwallet/utilities/logger.dart'; -import 'package:stackwallet/utilities/prefs.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; @@ -83,9 +83,7 @@ class _HomeViewState extends ConsumerState { void _loadCNData() { // unawaited future - // - final externalCalls = Prefs.instance.externalCalls; - if (externalCalls) { + if (ref.read(prefsChangeNotifierProvider).externalCalls) { _exchangeDataLoadingService.loadAll(ref); } else { Logging.instance.log("User does not want to use external calls", @@ -289,7 +287,7 @@ class _HomeViewState extends ConsumerState { (previous, next) { if (next is int) { if (next == 1) { - _loadCNData(); + _exchangeDataLoadingService.loadAll(ref); } if (next >= 0 && next <= 1) { _pageController.animateToPage( diff --git a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart index 61a6c4185..341fc35da 100644 --- a/lib/pages/home_view/sub_widgets/home_view_button_bar.dart +++ b/lib/pages/home_view/sub_widgets/home_view_button_bar.dart @@ -101,10 +101,10 @@ class _HomeViewButtonBarState extends ConsumerState { ref.read(homeViewPageIndexStateProvider.state).state = 1; } // DateTime now = DateTime.now(); - if (ref.read(prefsChangeNotifierProvider).externalCalls) { - print("loading?"); - await ExchangeDataLoadingService().loadAll(ref); - } + // if (ref.read(prefsChangeNotifierProvider).externalCalls) { + // print("loading?"); + await ExchangeDataLoadingService().loadAll(ref); + // } // if (now.difference(_lastRefreshed) > _refreshInterval) { // await ExchangeDataLoadingService().loadAll(ref); // } diff --git a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart index 853e4dd9b..0d6ddd305 100644 --- a/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart +++ b/lib/pages/wallet_view/sub_widgets/wallet_summary_info.dart @@ -70,6 +70,8 @@ class _WalletSummaryInfoState extends State { builder: (_, ref, __) { final Coin coin = ref.watch(managerProvider.select((value) => value.coin)); + final externalCalls = ref.watch(prefsChangeNotifierProvider + .select((value) => value.externalCalls)); Future? totalBalanceFuture; Future? availableBalanceFuture; @@ -176,18 +178,19 @@ class _WalletSummaryInfoState extends State { ), ), ), - Text( - "${Format.localizedStringAsFixed( - value: priceTuple.item1 * balanceToShow, - locale: locale, - decimalPlaces: 2, - )} $baseCurrency", - style: STextStyles.subtitle500(context).copyWith( - color: Theme.of(context) - .extension()! - .textFavoriteCard, + if (externalCalls) + Text( + "${Format.localizedStringAsFixed( + value: priceTuple.item1 * balanceToShow, + locale: locale, + decimalPlaces: 2, + )} $baseCurrency", + style: STextStyles.subtitle500(context).copyWith( + color: Theme.of(context) + .extension()! + .textFavoriteCard, + ), ), - ), ], ); } else { diff --git a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart index fdb8bf1a9..8d7aac85f 100644 --- a/lib/pages/wallet_view/transaction_views/transaction_details_view.dart +++ b/lib/pages/wallet_view/transaction_views/transaction_details_view.dart @@ -255,17 +255,19 @@ class _TransactionDetailsViewState const SizedBox( height: 2, ), - SelectableText( - "${Format.localizedStringAsFixed(value: (coin == Coin.monero ? (amount / 10000.toDecimal()).toDecimal() : coin == Coin.wownero ? (amount / 1000.toDecimal()).toDecimal() : amount) * ref.watch(priceAnd24hChangeNotifierProvider.select((value) => value.getPrice(coin).item1)), locale: ref.watch( - localeServiceChangeNotifierProvider - .select((value) => value.locale), - ), decimalPlaces: 2)} ${ref.watch( - prefsChangeNotifierProvider.select( - (value) => value.currency, - ), - )}", - style: STextStyles.itemSubtitle(context), - ), + if (ref.watch(prefsChangeNotifierProvider + .select((value) => value.externalCalls))) + SelectableText( + "${Format.localizedStringAsFixed(value: (coin == Coin.monero ? (amount / 10000.toDecimal()).toDecimal() : coin == Coin.wownero ? (amount / 1000.toDecimal()).toDecimal() : amount) * ref.watch(priceAnd24hChangeNotifierProvider.select((value) => value.getPrice(coin).item1)), locale: ref.watch( + localeServiceChangeNotifierProvider + .select((value) => value.locale), + ), decimalPlaces: 2)} ${ref.watch( + prefsChangeNotifierProvider.select( + (value) => value.currency, + ), + )}", + style: STextStyles.itemSubtitle(context), + ), ], ), TxIcon( diff --git a/lib/pages/wallet_view/wallet_view.dart b/lib/pages/wallet_view/wallet_view.dart index 488ed19cd..c84ddf2b9 100644 --- a/lib/pages/wallet_view/wallet_view.dart +++ b/lib/pages/wallet_view/wallet_view.dart @@ -37,6 +37,7 @@ import 'package:stackwallet/utilities/enums/backup_frequency_type.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/enums/flush_bar_type.dart'; import 'package:stackwallet/utilities/enums/wallet_balance_toggle_state.dart'; +import 'package:stackwallet/utilities/logger.dart'; import 'package:stackwallet/utilities/text_styles.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; @@ -45,12 +46,6 @@ import 'package:stackwallet/widgets/custom_loading_overlay.dart'; import 'package:stackwallet/widgets/stack_dialog.dart'; import 'package:tuple/tuple.dart'; -import 'package:stackwallet/hive/db.dart'; - -import 'package:stackwallet/utilities/logger.dart'; - -import 'package:stackwallet/utilities/prefs.dart'; - /// [eventBus] should only be set during testing class WalletView extends ConsumerStatefulWidget { const WalletView({ @@ -235,12 +230,8 @@ class _WalletViewState extends ConsumerState { } void _onExchangePressed(BuildContext context) async { - final _cnLoadingService = ExchangeDataLoadingService(); - final externalCalls = Prefs.instance.externalCalls; - if (!externalCalls) { - print("loading?"); - unawaited(_cnLoadingService.loadAll(ref)); - } + unawaited(_cnLoadingService.loadAll(ref)); + final coin = ref.read(managerProvider).coin; if (coin == Coin.epicCash) { @@ -371,9 +362,7 @@ class _WalletViewState extends ConsumerState { void _loadCNData() { // unawaited future - final externalCalls = DB.instance - .get(boxName: DB.boxNamePrefs, key: "externalCalls") as bool?; - if (externalCalls ?? false) { + if (ref.read(prefsChangeNotifierProvider).externalCalls) { _cnLoadingService.loadAll(ref, coin: ref.read(managerProvider).coin); } else { Logging.instance.log("User does not want to use external calls", diff --git a/lib/pages/wallets_view/sub_widgets/favorite_card.dart b/lib/pages/wallets_view/sub_widgets/favorite_card.dart index bc95d51b5..924e904f3 100644 --- a/lib/pages/wallets_view/sub_widgets/favorite_card.dart +++ b/lib/pages/wallets_view/sub_widgets/favorite_card.dart @@ -49,6 +49,8 @@ class _FavoriteCardState extends ConsumerState { @override Widget build(BuildContext context) { final coin = ref.watch(managerProvider.select((value) => value.coin)); + final externalCalls = ref.watch( + prefsChangeNotifierProvider.select((value) => value.externalCalls)); return GestureDetector( onTap: () { @@ -70,7 +72,9 @@ class _FavoriteCardState extends ConsumerState { width: widget.width, height: widget.height, decoration: BoxDecoration( - color: Theme.of(context).extension()!.colorForCoin(coin), + color: Theme.of(context) + .extension()! + .colorForCoin(coin), borderRadius: BorderRadius.circular( Constants.size.circularBorderRadius, ), @@ -138,7 +142,9 @@ class _FavoriteCardState extends ConsumerState { ref.watch(managerProvider .select((value) => value.walletName)), style: STextStyles.itemSubtitle12(context).copyWith( - color: Theme.of(context).extension()!.textFavoriteCard, + color: Theme.of(context) + .extension()! + .textFavoriteCard, ), overflow: TextOverflow.fade, ), @@ -159,14 +165,16 @@ class _FavoriteCardState extends ConsumerState { snapshot.hasData) { if (snapshot.data != null) { _cachedBalance = snapshot.data!; - _cachedFiatValue = _cachedBalance * - ref - .watch( - priceAnd24hChangeNotifierProvider.select( - (value) => value.getPrice(coin), - ), - ) - .item1; + if (externalCalls) { + _cachedFiatValue = _cachedBalance * + ref + .watch( + priceAnd24hChangeNotifierProvider.select( + (value) => value.getPrice(coin), + ), + ) + .item1; + } } } return Column( @@ -185,30 +193,36 @@ class _FavoriteCardState extends ConsumerState { )} ${coin.ticker}", style: STextStyles.titleBold12(context).copyWith( fontSize: 16, - color: Theme.of(context).extension()!.textFavoriteCard, + color: Theme.of(context) + .extension()! + .textFavoriteCard, ), ), ), - const SizedBox( - height: 4, - ), - Text( - "${Format.localizedStringAsFixed( - decimalPlaces: 2, - value: _cachedFiatValue, - locale: ref.watch( - localeServiceChangeNotifierProvider - .select((value) => value.locale), - ), - )} ${ref.watch( - prefsChangeNotifierProvider - .select((value) => value.currency), - )}", - style: STextStyles.itemSubtitle12(context).copyWith( - fontSize: 10, - color: Theme.of(context).extension()!.textFavoriteCard, + if (externalCalls) + const SizedBox( + height: 4, + ), + if (externalCalls) + Text( + "${Format.localizedStringAsFixed( + decimalPlaces: 2, + value: _cachedFiatValue, + locale: ref.watch( + localeServiceChangeNotifierProvider + .select((value) => value.locale), + ), + )} ${ref.watch( + prefsChangeNotifierProvider + .select((value) => value.currency), + )}", + style: STextStyles.itemSubtitle12(context).copyWith( + fontSize: 10, + color: Theme.of(context) + .extension()! + .textFavoriteCard, + ), ), - ), ], ); }, diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index 79fe27bad..61ef2e9de 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -254,7 +254,7 @@ Future> isolateRestore( } final root = getBip32Root(mnemonic, network); - while (currentIndex < lastFoundIndex + 20) { + while (currentIndex < lastFoundIndex + 50) { final mintKeyPair = getBip32NodeFromRoot(MINT_INDEX, currentIndex, root); final mintTag = CreateTag( Format.uint8listToString(mintKeyPair.privateKey!), @@ -1356,7 +1356,7 @@ class FiroWallet extends CoinServiceAPI { List utxoObjectsToUse = []; for (var i = 0; - satoshisBeingUsed < satoshiAmountToSend && i < spendableOutputs.length; + satoshisBeingUsed <= satoshiAmountToSend && i < spendableOutputs.length; i++) { utxoObjectsToUse.add(spendableOutputs[i]); satoshisBeingUsed += spendableOutputs[i].value; diff --git a/lib/services/notifications_service.dart b/lib/services/notifications_service.dart index 8ade3e969..2368adeab 100644 --- a/lib/services/notifications_service.dart +++ b/lib/services/notifications_service.dart @@ -84,7 +84,9 @@ class NotificationsService extends ChangeNotifier { _timer = Timer.periodic(notificationRefreshInterval, (_) { Logging.instance .log("Periodic notifications update check", level: LogLevel.Info); - _checkTrades(); + if (prefs.externalCalls) { + _checkTrades(); + } _checkTransactions(); }); } diff --git a/lib/services/price.dart b/lib/services/price.dart index 924c77f74..4f6650b06 100644 --- a/lib/services/price.dart +++ b/lib/services/price.dart @@ -7,9 +7,8 @@ import 'package:http/http.dart'; import 'package:stackwallet/hive/db.dart'; import 'package:stackwallet/utilities/enums/coin_enum.dart'; import 'package:stackwallet/utilities/logger.dart'; -import 'package:tuple/tuple.dart'; - import 'package:stackwallet/utilities/prefs.dart'; +import 'package:tuple/tuple.dart'; class PriceAPI { static const refreshInterval = 60; diff --git a/lib/services/price_service.dart b/lib/services/price_service.dart index 8986d25e5..eb2b1eba4 100644 --- a/lib/services/price_service.dart +++ b/lib/services/price_service.dart @@ -19,9 +19,7 @@ class PriceService extends ChangeNotifier { Tuple2 getPrice(Coin coin) => _cachedPrices[coin]!; - PriceService(this.baseTicker) { - start(true); - } + PriceService(this.baseTicker); Future updatePrice() async { final priceMap = diff --git a/lib/utilities/default_nodes.dart b/lib/utilities/default_nodes.dart index 2ffd6f307..b09787d33 100644 --- a/lib/utilities/default_nodes.dart +++ b/lib/utilities/default_nodes.dart @@ -159,8 +159,8 @@ abstract class DefaultNodes { ); static NodeModel get bitcoincashTestnet => NodeModel( - host: "testnet.hsmiths.com", - port: 53012, + host: "bitcoincash-testnet.stackwallet.com", + port: 60002, name: defaultName, id: _nodeId(Coin.bitcoincashTestnet), useSSL: true, diff --git a/lib/utilities/prefs.dart b/lib/utilities/prefs.dart index 0109755f7..2fc21a78d 100644 --- a/lib/utilities/prefs.dart +++ b/lib/utilities/prefs.dart @@ -569,6 +569,6 @@ class Prefs extends ChangeNotifier { Future _getHasExternalCalls() async { return await DB.instance.get( boxName: DB.boxNamePrefs, key: "externalCalls") as bool? ?? - false; + true; } } diff --git a/lib/widgets/transaction_card.dart b/lib/widgets/transaction_card.dart index b2feaca7a..cb737ae08 100644 --- a/lib/widgets/transaction_card.dart +++ b/lib/widgets/transaction_card.dart @@ -202,35 +202,39 @@ class _TransactionCardState extends ConsumerState { ), ), ), - const SizedBox( - width: 10, - ), - Flexible( - child: FittedBox( - fit: BoxFit.scaleDown, - child: Builder( - builder: (_) { - // TODO: modify Format. to take optional Coin parameter so this type oif check isn't done in ui - int value = _transaction.amount; - if (coin == Coin.monero) { - value = (value ~/ 10000); - } else if (coin == Coin.wownero) { - value = (value ~/ 1000); - } + if (ref.watch(prefsChangeNotifierProvider + .select((value) => value.externalCalls))) + const SizedBox( + width: 10, + ), + if (ref.watch(prefsChangeNotifierProvider + .select((value) => value.externalCalls))) + Flexible( + child: FittedBox( + fit: BoxFit.scaleDown, + child: Builder( + builder: (_) { + // TODO: modify Format. to take optional Coin parameter so this type oif check isn't done in ui + int value = _transaction.amount; + if (coin == Coin.monero) { + value = (value ~/ 10000); + } else if (coin == Coin.wownero) { + value = (value ~/ 1000); + } - return Text( - "${Format.localizedStringAsFixed( - value: Format.satoshisToAmount(value) * - price, - locale: locale, - decimalPlaces: 2, - )} $baseCurrency", - style: STextStyles.label(context), - ); - }, + return Text( + "${Format.localizedStringAsFixed( + value: Format.satoshisToAmount(value) * + price, + locale: locale, + decimalPlaces: 2, + )} $baseCurrency", + style: STextStyles.label(context), + ); + }, + ), ), ), - ), ], ), ], diff --git a/pubspec.yaml b/pubspec.yaml index 7a25796c0..d4d354625 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -11,7 +11,7 @@ description: Stack Wallet # In iOS, build-name is used as CFBundleShortVersionString while build-number used as CFBundleVersion. # Read more about iOS versioning at # https://developer.apple.com/library/archive/documentation/General/Reference/InfoPlistKeyReference/Articles/CoreFoundationKeys.html -version: 1.5.7+77 +version: 1.5.8+78 environment: sdk: ">=2.17.0 <3.0.0" diff --git a/scripts/prebuild.sh b/scripts/prebuild.sh old mode 100644 new mode 100755 index 31acfa82c..d24076666 --- a/scripts/prebuild.sh +++ b/scripts/prebuild.sh @@ -2,5 +2,5 @@ KEYS=../lib/external_api_keys.dart if ! test -f "$KEYS"; then echo 'prebuild.sh: creating template lib/external_api_keys.dart file' - echo 'const kChangeNowApiKey = "";' > $KEYS + printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";' > $KEYS fi diff --git a/scripts/setup.sh b/scripts/setup.sh index f65e6640f..5525d7814 100644 --- a/scripts/setup.sh +++ b/scripts/setup.sh @@ -29,7 +29,7 @@ git submodule update --init --recursive KEYS="$HOME/projects/stack_wallet/lib/external_api_keys.dart" if ! test -f "$KEYS"; then echo 'prebuild.sh: creating template lib/external_api_keys.dart file' - echo 'const kChangeNowApiKey = "";' > $KEYS + printf 'const kChangeNowApiKey = "";\nconst kSimpleSwapApiKey = "";' > $KEYS fi #install stack wallet dependencies