mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-12-23 11:59:30 +00:00
commit
205087760d
25 changed files with 1182 additions and 1473 deletions
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -50,3 +50,8 @@ test/services/coins/particl/particl_wallet_test_parameters.dart
|
|||
coverage
|
||||
scripts/**/build
|
||||
/lib/external_api_keys.dart
|
||||
|
||||
libcw_monero.dll
|
||||
libcw_wownero.dll
|
||||
libepic_cash_wallet.dll
|
||||
libmobileliblelantus.dll
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 9a150d8cd2c3625424b0059e6b7306f3659fdbe0
|
||||
Subproject commit 0309140a95a51388df0effcc39ff0a25b2752b29
|
|
@ -1 +1 @@
|
|||
Subproject commit db928e6f11844138ce87de2b8c1abe3305ec589e
|
||||
Subproject commit 6864d7c0d4fa68c371e3f0c067afd50b0d59cc9b
|
|
@ -1 +1 @@
|
|||
Subproject commit d636f16aa0079c7ef47f0c8547fba1635e5eb33b
|
||||
Subproject commit 66eaa2f3c7133f1dbf0b1fc950e7a9e3cc611185
|
|
@ -33,9 +33,9 @@ class SearchableCoinList extends ConsumerWidget {
|
|||
_coins.remove(Coin.firoTestNet);
|
||||
|
||||
// Kidgloves for Wownero on desktop
|
||||
if(isDesktop) {
|
||||
_coins.remove(Coin.wownero);
|
||||
}
|
||||
// if(isDesktop) {
|
||||
// _coins.remove(Coin.wownero);
|
||||
// }
|
||||
|
||||
return _coins;
|
||||
}
|
||||
|
|
|
@ -161,7 +161,7 @@ class _VerifyRecoveryPhraseViewState
|
|||
result.insert(random.nextInt(wordsToShow), chosenWord);
|
||||
|
||||
//todo: this prints sensitive info
|
||||
// debugPrint("Mnemonic game correct word: $chosenWord");
|
||||
debugPrint("Mnemonic game correct word: $chosenWord");
|
||||
|
||||
return Tuple2(result, chosenWord);
|
||||
}
|
||||
|
|
|
@ -20,7 +20,6 @@ import 'package:stackwallet/providers/global/debug_service_provider.dart';
|
|||
import 'package:stackwallet/utilities/assets.dart';
|
||||
import 'package:stackwallet/utilities/clipboard_interface.dart';
|
||||
import 'package:stackwallet/utilities/constants.dart';
|
||||
import 'package:stackwallet/utilities/enums/flush_bar_type.dart';
|
||||
import 'package:stackwallet/utilities/logger.dart';
|
||||
import 'package:stackwallet/utilities/stack_file_system.dart';
|
||||
import 'package:stackwallet/utilities/text_styles.dart';
|
||||
|
|
|
@ -1297,7 +1297,7 @@ class BitcoinWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
|
@ -1174,7 +1174,7 @@ class BitcoinCashWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
|
@ -197,7 +197,7 @@ abstract class CoinServiceAPI {
|
|||
walletId: walletId,
|
||||
walletName: walletName,
|
||||
coin: coin,
|
||||
secureStore: secureStorageInterface,
|
||||
secureStorage: secureStorageInterface,
|
||||
// tracker: tracker,
|
||||
);
|
||||
|
||||
|
|
|
@ -1064,7 +1064,7 @@ class DogecoinWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
|
@ -883,7 +883,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
@override
|
||||
Future<void> updateSentCachedTxData(Map<String, dynamic> txData) async {
|
||||
final currentPrice = await firoPrice;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
@ -2756,7 +2756,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
var price = await firoPrice;
|
||||
var builtHex = txb.build();
|
||||
// return builtHex;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale =Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
return {
|
||||
"transaction": builtHex,
|
||||
"txid": txId,
|
||||
|
@ -2810,7 +2810,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
final currentPrice = await firoPrice;
|
||||
// Grab the most recent information on all the joinsplits
|
||||
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final updatedJSplit = await getJMintTransactions(cachedElectrumXClient,
|
||||
joinsplits, _prefs.currency, coin, currentPrice, locale!);
|
||||
|
||||
|
@ -3249,7 +3249,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
final currentPrice = await firoPrice;
|
||||
final List<Map<String, dynamic>> midSortedArray = [];
|
||||
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
|
||||
Logging.instance.log("refresh the txs", level: LogLevel.Info);
|
||||
for (final txObject in allTransactions) {
|
||||
|
@ -4324,7 +4324,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
currency,
|
||||
coin,
|
||||
currentPrice,
|
||||
(await Devicelocale.currentLocale)!);
|
||||
(Platform.isWindows ? "en_US" : await Devicelocale.currentLocale)!);
|
||||
Logging.instance.log(spendTxs, level: LogLevel.Info);
|
||||
for (var element in spendTxs) {
|
||||
transactionMap[element.txid] = element;
|
||||
|
@ -4375,7 +4375,7 @@ class FiroWallet extends CoinServiceAPI {
|
|||
final lelantusEntry = await _getLelantusEntry();
|
||||
final anonymitySets = await fetchAnonymitySets();
|
||||
final locktime = await getBlockHead(electrumXClient);
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
|
||||
ReceivePort receivePort = await getIsolate({
|
||||
"function": "createJoinSplit",
|
||||
|
|
|
@ -1299,7 +1299,7 @@ class LitecoinWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
|
@ -1096,14 +1096,14 @@ class MoneroWallet extends CoinServiceAPI {
|
|||
void onNewBlock() {
|
||||
//
|
||||
print("=============================");
|
||||
print("New Block!");
|
||||
print("New Block! :: $walletName");
|
||||
print("=============================");
|
||||
}
|
||||
|
||||
void onNewTransaction() {
|
||||
//
|
||||
print("=============================");
|
||||
print("New Transaction!");
|
||||
print("New Transaction! :: $walletName");
|
||||
print("=============================");
|
||||
|
||||
// call this here?
|
||||
|
|
|
@ -1287,7 +1287,7 @@ class NamecoinWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
|
@ -1200,7 +1200,7 @@ class ParticlWallet extends CoinServiceAPI {
|
|||
final priceData =
|
||||
await _priceAPI.getPricesAnd24hChange(baseCurrency: _prefs.currency);
|
||||
Decimal currentPrice = priceData[coin]?.item1 ?? Decimal.zero;
|
||||
final locale = await Devicelocale.currentLocale;
|
||||
final locale = Platform.isWindows ? "en_US" : await Devicelocale.currentLocale;
|
||||
final String worthNow = Format.localizedStringAsFixed(
|
||||
value:
|
||||
((currentPrice * Decimal.fromInt(txData["recipientAmt"] as int)) /
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,4 @@
|
|||
import 'dart:io';
|
||||
import 'package:devicelocale/devicelocale.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
|
@ -7,7 +8,7 @@ class LocaleService extends ChangeNotifier {
|
|||
String get locale => _locale;
|
||||
|
||||
Future<void> loadLocale({bool notify = true}) async {
|
||||
_locale = await Devicelocale.currentLocale ?? "en_US";
|
||||
_locale =Platform.isWindows ? "en_US" : await Devicelocale.currentLocale ?? "en_US";
|
||||
if (notify) {
|
||||
notifyListeners();
|
||||
}
|
||||
|
|
|
@ -11,12 +11,9 @@ import 'package:stackwallet/services/coins/litecoin/litecoin_wallet.dart'
|
|||
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/particl/particl_wallet.dart'
|
||||
as particl;
|
||||
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,
|
||||
|
@ -42,7 +39,7 @@ enum Coin {
|
|||
firoTestNet,
|
||||
}
|
||||
|
||||
final int kTestNetCoinCount = Util.isDesktop ? 5 : 4;
|
||||
final int kTestNetCoinCount = 4; // Util.isDesktop ? 5 : 4;
|
||||
|
||||
extension CoinExt on Coin {
|
||||
String get prettyName {
|
||||
|
|
|
@ -15,8 +15,7 @@ abstract class StackFileSystem {
|
|||
} else if (Platform.isLinux) {
|
||||
appDirectory = Directory("${Platform.environment['HOME']}/.stackwallet");
|
||||
} else if (Platform.isWindows) {
|
||||
// TODO: windows root .stackwallet dir location
|
||||
throw Exception("Unsupported platform");
|
||||
appDirectory = await getApplicationSupportDirectory();
|
||||
} else if (Platform.isMacOS) {
|
||||
// currently run in ipad mode??
|
||||
throw Exception("Unsupported platform");
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
/* Begin PBXFileReference section */
|
||||
333000ED22D3DE5D00554162 /* Warnings.xcconfig */ = {isa = PBXFileReference; lastKnownFileType = text.xcconfig; path = Warnings.xcconfig; sourceTree = "<group>"; };
|
||||
335BBD1A22A9A15E00E9071D /* GeneratedPluginRegistrant.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = GeneratedPluginRegistrant.swift; sourceTree = "<group>"; };
|
||||
33CC10ED2044A3C60003C045 /* firo_wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = firo_wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10ED2044A3C60003C045 /* Stack Wallet.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Stack Wallet.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
33CC10F02044A3C60003C045 /* AppDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AppDelegate.swift; sourceTree = "<group>"; };
|
||||
33CC10F22044A3C60003C045 /* Assets.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = Assets.xcassets; path = Runner/Assets.xcassets; sourceTree = "<group>"; };
|
||||
33CC10F52044A3C60003C045 /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = "<group>"; };
|
||||
|
@ -112,7 +112,7 @@
|
|||
33CC10EE2044A3C60003C045 /* Products */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
33CC10ED2044A3C60003C045 /* firo_wallet.app */,
|
||||
33CC10ED2044A3C60003C045 /* Stack Wallet.app */,
|
||||
);
|
||||
name = Products;
|
||||
sourceTree = "<group>";
|
||||
|
@ -193,7 +193,7 @@
|
|||
);
|
||||
name = Runner;
|
||||
productName = Runner;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* firo_wallet.app */;
|
||||
productReference = 33CC10ED2044A3C60003C045 /* Stack Wallet.app */;
|
||||
productType = "com.apple.product-type.application";
|
||||
};
|
||||
/* End PBXNativeTarget section */
|
||||
|
|
|
@ -15,7 +15,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "firo_wallet.app"
|
||||
BuildableName = "Stack Wallet.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -31,7 +31,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "firo_wallet.app"
|
||||
BuildableName = "Stack Wallet.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -54,7 +54,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "firo_wallet.app"
|
||||
BuildableName = "Stack Wallet.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
@ -71,7 +71,7 @@
|
|||
<BuildableReference
|
||||
BuildableIdentifier = "primary"
|
||||
BlueprintIdentifier = "33CC10EC2044A3C60003C045"
|
||||
BuildableName = "firo_wallet.app"
|
||||
BuildableName = "Stack Wallet.app"
|
||||
BlueprintName = "Runner"
|
||||
ReferencedContainer = "container:Runner.xcodeproj">
|
||||
</BuildableReference>
|
||||
|
|
|
@ -5,10 +5,10 @@
|
|||
// 'flutter create' template.
|
||||
|
||||
// The application's name. By default this is also the title of the Flutter window.
|
||||
PRODUCT_NAME = firo_wallet
|
||||
PRODUCT_NAME = Stack Wallet
|
||||
|
||||
// The application's bundle identifier
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.firoWallet
|
||||
PRODUCT_BUNDLE_IDENTIFIER = com.cypherstack.stack_wallet
|
||||
|
||||
// The copyright displayed in application information
|
||||
PRODUCT_COPYRIGHT = Copyright © 2022 com.cypherstack. All rights reserved.
|
||||
|
|
9
scripts/windows/build_all.sh
Executable file
9
scripts/windows/build_all.sh
Executable file
|
@ -0,0 +1,9 @@
|
|||
#!/bin/bash
|
||||
|
||||
mkdir -p build
|
||||
(cd ../../crypto_plugins/flutter_libepiccash/scripts/windows && ./build_all.sh ) &
|
||||
(cd ../../crypto_plugins/flutter_liblelantus/scripts/windows && ./build_all.sh ) &
|
||||
(cd ../../crypto_plugins/flutter_libmonero/scripts/windows && ./build_all.sh) &
|
||||
|
||||
wait
|
||||
echo "Done building"
|
|
@ -90,12 +90,12 @@ BEGIN
|
|||
BLOCK "040904e4"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "com.cypherstack" "\0"
|
||||
VALUE "FileDescription", "firo_wallet" "\0"
|
||||
VALUE "FileDescription", "Stack Wallet" "\0"
|
||||
VALUE "FileVersion", VERSION_AS_STRING "\0"
|
||||
VALUE "InternalName", "firo_wallet" "\0"
|
||||
VALUE "InternalName", "Stack Wallet" "\0"
|
||||
VALUE "LegalCopyright", "Copyright (C) 2022 com.cypherstack. All rights reserved." "\0"
|
||||
VALUE "OriginalFilename", "firo_wallet.exe" "\0"
|
||||
VALUE "ProductName", "firo_wallet" "\0"
|
||||
VALUE "OriginalFilename", "Stack Wallet.exe" "\0"
|
||||
VALUE "ProductName", "Stack Wallet" "\0"
|
||||
VALUE "ProductVersion", VERSION_AS_STRING "\0"
|
||||
END
|
||||
END
|
||||
|
|
Loading…
Reference in a new issue