diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml
index 702940c60..e46a16c6c 100644
--- a/.github/workflows/test.yaml
+++ b/.github/workflows/test.yaml
@@ -25,14 +25,6 @@ jobs:
sudo apt clean
sudo apt update
sudo apt install -y unzip automake build-essential file pkg-config git python libtool libtinfo5 cmake openjdk-8-jre-headless libgit2-dev clang libncurses5-dev libncursesw5-dev zlib1g-dev llvm debhelper libclang-dev opencl-headers libssl-dev ocl-icd-opencl-dev libc6-dev-i386
- - name: Build Lelantus
- run: |
- cd crypto_plugins/flutter_liblelantus/scripts/linux/
- ./build_all.sh
- - name: Build Monero
- run: |
- cd crypto_plugins/flutter_libmonero/scripts/linux/
- ./build_monero_all.sh
- name: Build Epic Cash
run: |
cd crypto_plugins/flutter_libepiccash/scripts/linux/
diff --git a/.gitignore b/.gitignore
index b61c79144..30fb5a6e1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -63,7 +63,6 @@ scripts/**/build
/lib/external_api_keys.dart
libepic_cash_wallet.dll
-libmobileliblelantus.dll
libtor_ffi.dll
flutter_libsparkmobile.dll
secp256k1.dll
@@ -112,3 +111,4 @@ scripts/linux/build/libsecret/subprojects/gi-docgen/.meson-subproject-wrap-hash.
crypto_plugins/cs_monero/built_outputs
crypto_plugins/cs_monero/build
crypto_plugins/*.diff
+/devtools_options.yaml
diff --git a/.gitmodules b/.gitmodules
index 2186826df..d9a561cc1 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -1,9 +1,6 @@
[submodule "crypto_plugins/flutter_libepiccash"]
path = crypto_plugins/flutter_libepiccash
url = https://github.com/cypherstack/flutter_libepiccash.git
-[submodule "crypto_plugins/flutter_liblelantus"]
- path = crypto_plugins/flutter_liblelantus
- url = https://github.com/cypherstack/flutter_liblelantus.git
[submodule "crypto_plugins/frostdart"]
path = crypto_plugins/frostdart
url = https://github.com/cypherstack/frostdart
diff --git a/analysis_options.yaml b/analysis_options.yaml
index ea46ed3ca..db030aa14 100644
--- a/analysis_options.yaml
+++ b/analysis_options.yaml
@@ -92,7 +92,7 @@ linter:
constant_identifier_names: false
prefer_final_locals: true
prefer_final_in_for_each: true
- require_trailing_commas: true
+# require_trailing_commas: true // causes issues with dart 3.7
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule
diff --git a/asset_sources/default_themes/stack_duo/dark.zip b/asset_sources/default_themes/stack_duo/dark.zip
index 8b31f4278..a44c89cf8 100644
Binary files a/asset_sources/default_themes/stack_duo/dark.zip and b/asset_sources/default_themes/stack_duo/dark.zip differ
diff --git a/asset_sources/default_themes/stack_duo/light.zip b/asset_sources/default_themes/stack_duo/light.zip
index 120573ccf..82dc05870 100644
Binary files a/asset_sources/default_themes/stack_duo/light.zip and b/asset_sources/default_themes/stack_duo/light.zip differ
diff --git a/asset_sources/default_themes/stack_wallet/.gitignore b/asset_sources/default_themes/stack_wallet/.gitignore
new file mode 100644
index 000000000..49f4a6294
--- /dev/null
+++ b/asset_sources/default_themes/stack_wallet/.gitignore
@@ -0,0 +1,2 @@
+light/
+dark/
diff --git a/asset_sources/default_themes/stack_wallet/dark.zip b/asset_sources/default_themes/stack_wallet/dark.zip
index 8b31f4278..a44c89cf8 100644
Binary files a/asset_sources/default_themes/stack_wallet/dark.zip and b/asset_sources/default_themes/stack_wallet/dark.zip differ
diff --git a/asset_sources/default_themes/stack_wallet/light.zip b/asset_sources/default_themes/stack_wallet/light.zip
index 120573ccf..82dc05870 100644
Binary files a/asset_sources/default_themes/stack_wallet/light.zip and b/asset_sources/default_themes/stack_wallet/light.zip differ
diff --git a/asset_sources/svg/campfire/socials/twitter-brands.svg b/asset_sources/svg/campfire/socials/twitter-brands.svg
deleted file mode 100644
index 96464c99f..000000000
--- a/asset_sources/svg/campfire/socials/twitter-brands.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/asset_sources/svg/campfire/socials/x.svg b/asset_sources/svg/campfire/socials/x.svg
new file mode 100644
index 000000000..114491669
--- /dev/null
+++ b/asset_sources/svg/campfire/socials/x.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/asset_sources/svg/stack_duo/socials/twitter-brands.svg b/asset_sources/svg/stack_duo/socials/twitter-brands.svg
deleted file mode 100644
index 96464c99f..000000000
--- a/asset_sources/svg/stack_duo/socials/twitter-brands.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/asset_sources/svg/stack_duo/socials/x.svg b/asset_sources/svg/stack_duo/socials/x.svg
new file mode 100644
index 000000000..114491669
--- /dev/null
+++ b/asset_sources/svg/stack_duo/socials/x.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/asset_sources/svg/stack_wallet/socials/twitter-brands.svg b/asset_sources/svg/stack_wallet/socials/twitter-brands.svg
deleted file mode 100644
index 96464c99f..000000000
--- a/asset_sources/svg/stack_wallet/socials/twitter-brands.svg
+++ /dev/null
@@ -1 +0,0 @@
-
\ No newline at end of file
diff --git a/asset_sources/svg/stack_wallet/socials/x.svg b/asset_sources/svg/stack_wallet/socials/x.svg
new file mode 100644
index 000000000..114491669
--- /dev/null
+++ b/asset_sources/svg/stack_wallet/socials/x.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/crypto_plugins/flutter_liblelantus b/crypto_plugins/flutter_liblelantus
deleted file mode 160000
index 7b325030b..000000000
--- a/crypto_plugins/flutter_liblelantus
+++ /dev/null
@@ -1 +0,0 @@
-Subproject commit 7b325030bce46a423aa46497d1a608b7a8a58976
diff --git a/crypto_plugins/frostdart b/crypto_plugins/frostdart
index 6f1310ecc..5e8a51592 160000
--- a/crypto_plugins/frostdart
+++ b/crypto_plugins/frostdart
@@ -1 +1 @@
-Subproject commit 6f1310eccd336fb3c8dc00b61e39a3f0f3a2b59a
+Subproject commit 5e8a51592690650e7ac63fafa81017dfc51ae6d5
diff --git a/docs/building.md b/docs/building.md
index 4ba1b7150..6aa647e53 100644
--- a/docs/building.md
+++ b/docs/building.md
@@ -7,25 +7,12 @@ Here you will find instructions on how to install the necessary tools for buildi
- The only OS supported for building Android and Linux desktop is Ubuntu 20.04. Windows builds require using Ubuntu 20.04 on WSL2. macOS builds for itself and iOS. Advanced users may also be able to build on other Debian-based distributions like Linux Mint.
- Android setup ([Android Studio](https://developer.android.com/studio) and subsequent dependencies)
- 100 GB of storage
+- Install go: [https://go.dev/doc/install](https://go.dev/doc/install)
## Linux host
The following instructions are for building and running on a Linux host. Alternatively, see the [Mac](#mac-host) and/or [Windows](#windows-host) section. This entire section (except for the Android Studio section) needs to be completed in WSL if building on a Windows host.
-### Flutter
-Install Flutter 3.29.2 by [following their guide](https://docs.flutter.dev/get-started/install/linux/desktop?tab=download#install-the-flutter-sdk). You can also clone https://github.com/flutter/flutter, check out the `3.29.2` tag, and add its `flutter/bin` folder to your PATH as in
-```sh
-FLUTTER_DIR="$HOME/development/flutter"
-git clone https://github.com/flutter/flutter.git "$FLUTTER_DIR"
-cd "$FLUTTER_DIR"
-git checkout 3.29.2
-echo 'export PATH="$PATH:'"$FLUTTER_DIR"'/bin"' >> "$HOME/.profile"
-source "$HOME/.profile"
-flutter precache
-```
-
-Run `flutter doctor` in a terminal to confirm its installation.
-
### Android Studio
Install Android Studio. Follow instructions here [https://developer.android.com/studio/install#linux](https://developer.android.com/studio/install#linux) or install via snap:
```
@@ -58,7 +45,7 @@ sudo apt-get install libssl-dev curl unzip automake build-essential file pkg-con
For Ubuntu 20.04,
```
-sudo apt-get install valac
+sudo apt-get install valac python3-pip
pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1
```
@@ -89,6 +76,20 @@ sudo apt-get install clang cmake ninja-build pkg-config libgtk-3-dev liblzma-dev
pip3 install --upgrade meson==0.64.1 markdown==3.4.1 markupsafe==2.1.1 jinja2==3.1.2 pygments==2.13.0 toml==0.10.2 typogrify==2.0.7 tomli==2.0.1
```
+### Flutter
+Install Flutter 3.29.2 by [following their guide](https://docs.flutter.dev/get-started/install/linux/desktop?tab=download#install-the-flutter-sdk). You can also clone https://github.com/flutter/flutter, check out the `3.29.2` tag, and add its `flutter/bin` folder to your PATH as in
+```sh
+FLUTTER_DIR="$HOME/development/flutter"
+git clone https://github.com/flutter/flutter.git "$FLUTTER_DIR"
+cd "$FLUTTER_DIR"
+git checkout 3.29.2
+echo 'export PATH="$PATH:'"$FLUTTER_DIR"'/bin"' >> "$HOME/.profile"
+source "$HOME/.profile"
+flutter precache
+```
+
+Run `flutter doctor` in a terminal to confirm its installation.
+
### Clone the repository and initialize submodules
After installing the prerequisites listed above, download the code and init the submodules
```
@@ -163,6 +164,8 @@ cd scripts/windows
./deps.sh
```
+install go in WSL [https://go.dev/doc/install](https://go.dev/doc/install) (follow linux instructions) and ensure you have `x86_64-w64-mingw32-gcc`
+
and use `scripts/build_app.sh` to build plugins:
```
cd ..
@@ -283,7 +286,6 @@ The WSL2 host may optionally be navigated to the `stack_wallet` repository on th
If the DLLs were built on the WSL filesystem instead of on Windows, copy the resulting `dll`s to their respective positions on the Windows host:
- `stack_wallet/crypto_plugins/flutter_libepiccash/scripts/windows/build/libepic_cash_wallet.dll`
-- `stack_wallet/crypto_plugins/flutter_liblelantus/scripts/windows/build/libmobileliblelantus.dll`
diff --git a/ios/Podfile.lock b/ios/Podfile.lock
index add8f4224..3f6bee8e7 100644
--- a/ios/Podfile.lock
+++ b/ios/Podfile.lock
@@ -11,6 +11,8 @@ PODS:
- ReachabilitySwift
- cs_monero_flutter_libs_ios (0.0.1):
- Flutter
+ - cs_salvium_flutter_libs_ios (0.0.1):
+ - Flutter
- device_info_plus (0.0.1):
- Flutter
- devicelocale (0.0.1):
@@ -65,8 +67,6 @@ PODS:
- Flutter
- isar_flutter_libs (1.0.0):
- Flutter
- - lelantus (0.0.1):
- - Flutter
- local_auth_darwin (0.0.1):
- Flutter
- FlutterMacOS
@@ -87,6 +87,8 @@ PODS:
- "sqlite3 (3.46.0+1)":
- "sqlite3/common (= 3.46.0+1)"
- "sqlite3/common (3.46.0+1)"
+ - "sqlite3/dbstatvtab (3.46.0+1)":
+ - sqlite3/common
- "sqlite3/fts5 (3.46.0+1)":
- sqlite3/common
- "sqlite3/perf-threadsafe (3.46.0+1)":
@@ -95,7 +97,8 @@ PODS:
- sqlite3/common
- sqlite3_flutter_libs (0.0.1):
- Flutter
- - sqlite3 (~> 3.46.0)
+ - "sqlite3 (~> 3.46.0+1)"
+ - sqlite3/dbstatvtab
- sqlite3/fts5
- sqlite3/perf-threadsafe
- sqlite3/rtree
@@ -117,6 +120,7 @@ DEPENDENCIES:
- coinlib_flutter (from `.symlinks/plugins/coinlib_flutter/darwin`)
- connectivity_plus (from `.symlinks/plugins/connectivity_plus/ios`)
- cs_monero_flutter_libs_ios (from `.symlinks/plugins/cs_monero_flutter_libs_ios/ios`)
+ - cs_salvium_flutter_libs_ios (from `.symlinks/plugins/cs_salvium_flutter_libs_ios/ios`)
- device_info_plus (from `.symlinks/plugins/device_info_plus/ios`)
- devicelocale (from `.symlinks/plugins/devicelocale/ios`)
- file_picker (from `.symlinks/plugins/file_picker/ios`)
@@ -129,7 +133,6 @@ DEPENDENCIES:
- frostdart (from `.symlinks/plugins/frostdart/ios`)
- integration_test (from `.symlinks/plugins/integration_test/ios`)
- isar_flutter_libs (from `.symlinks/plugins/isar_flutter_libs/ios`)
- - lelantus (from `.symlinks/plugins/lelantus/ios`)
- local_auth_darwin (from `.symlinks/plugins/local_auth_darwin/darwin`)
- package_info_plus (from `.symlinks/plugins/package_info_plus/ios`)
- path_provider_foundation (from `.symlinks/plugins/path_provider_foundation/darwin`)
@@ -162,6 +165,8 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/connectivity_plus/ios"
cs_monero_flutter_libs_ios:
:path: ".symlinks/plugins/cs_monero_flutter_libs_ios/ios"
+ cs_salvium_flutter_libs_ios:
+ :path: ".symlinks/plugins/cs_salvium_flutter_libs_ios/ios"
device_info_plus:
:path: ".symlinks/plugins/device_info_plus/ios"
devicelocale:
@@ -186,8 +191,6 @@ EXTERNAL SOURCES:
:path: ".symlinks/plugins/integration_test/ios"
isar_flutter_libs:
:path: ".symlinks/plugins/isar_flutter_libs/ios"
- lelantus:
- :path: ".symlinks/plugins/lelantus/ios"
local_auth_darwin:
:path: ".symlinks/plugins/local_auth_darwin/darwin"
package_info_plus:
@@ -216,6 +219,7 @@ SPEC CHECKSUMS:
coinlib_flutter: 9275e8255ef67d3da33beb6e117d09ced4f46eb5
connectivity_plus: 07c49e96d7fc92bc9920617b83238c4d178b446a
cs_monero_flutter_libs_ios: fd353631682247f72a36493ff060d4328d6f720d
+ cs_salvium_flutter_libs_ios: f9d6ce540cb34d8cb8641822cf02fa0695a8d405
device_info_plus: 97af1d7e84681a90d0693e63169a5d50e0839a0d
devicelocale: 35ba84dc7f45f527c3001535d8c8d104edd5d926
DKImagePickerController: b512c28220a2b8ac7419f21c491fc8534b7601ac
@@ -230,7 +234,6 @@ SPEC CHECKSUMS:
frostdart: 4c72b69ccac2f13ede744107db046a125acce597
integration_test: 252f60fa39af5e17c3aa9899d35d908a0721b573
isar_flutter_libs: fdf730ca925d05687f36d7f1d355e482529ed097
- lelantus: 417f0221260013dfc052cae9cf4b741b6479edba
local_auth_darwin: 66e40372f1c29f383a314c738c7446e2f7fdadc3
MTBBarcodeScanner: f453b33c4b7dfe545d8c6484ed744d55671788cb
package_info_plus: c0502532a26c7662a62a356cebe2692ec5fe4ec4
@@ -240,13 +243,14 @@ SPEC CHECKSUMS:
SDWebImage: 72f86271a6f3139cc7e4a89220946489d4b9a866
share_plus: c3fef564749587fc939ef86ffb283ceac0baf9f5
sqlite3: 292c3e1bfe89f64e51ea7fc7dab9182a017c8630
- sqlite3_flutter_libs: 0d611efdf6d1c9297d5ab03dab21b75aeebdae31
+ sqlite3_flutter_libs: c00457ebd31e59fa6bb830380ddba24d44fbcd3b
stack_wallet_backup: 5b8563aba5d8ffbf2ce1944331ff7294a0ec7c03
SwiftProtobuf: 6ef3f0e422ef90d6605ca20b21a94f6c1324d6b3
SwiftyGif: 6c3eafd0ce693cad58bb63d2b2fb9bacb8552780
tor_ffi_plugin: d80e291b649379c8176e1be739e49be007d4ef93
url_launcher_ios: 5334b05cef931de560670eeae103fd3e431ac3fe
- wakelock_plus: 78ec7c5b202cab7761af8e2b2b3d0671be6c4ae1
+ wakelock_plus: 373cfe59b235a6dd5837d0fb88791d2f13a90d56
+ xelis_flutter: a6a1ee1f1e47f5aeb42dc4a5889358b79d8d90fc
PODFILE CHECKSUM: 57c8aed26fba39d3ec9424816221f294a07c58eb
diff --git a/lib/app_config.dart b/lib/app_config.dart
index 62ce560c3..09eeae26f 100644
--- a/lib/app_config.dart
+++ b/lib/app_config.dart
@@ -3,11 +3,7 @@ import 'wallets/crypto_currency/intermediate/frost_currency.dart';
part 'app_config.g.dart';
-enum AppFeature {
- themeSelection,
- buy,
- swap;
-}
+enum AppFeature { themeSelection, buy, swap }
abstract class AppConfig {
static const appName = _prefix + _separator + suffix;
@@ -27,7 +23,8 @@ abstract class AppConfig {
static List get coins => _supportedCoins;
- static ({String from, String to}) get swapDefaults => _swapDefaults;
+ static ({String from, String fromFuzzyNet, String to, String toFuzzyNet})
+ get swapDefaults => _swapDefaults;
static bool get isSingleCoinApp => coins.length == 1;
@@ -75,7 +72,13 @@ abstract class AppConfig {
/// Fuzzy logic. Use with caution!!
@Deprecated("dangerous")
static CryptoCurrency getCryptoCurrencyByPrettyName(final String prettyName) {
- final name = prettyName.replaceAll(" ", "").toLowerCase();
+ // trocador hack
+ const hackSplitter = " (Mainnet";
+ final name =
+ prettyName.contains(hackSplitter)
+ ? prettyName.split(hackSplitter).first.toLowerCase()
+ : prettyName.replaceAll(" ", "").toLowerCase();
+
try {
return coins.firstWhere(
(e) => e.identifier.toLowerCase() == name || e.prettyName == prettyName,
diff --git a/lib/db/db_version_migration.dart b/lib/db/db_version_migration.dart
index e18c4b720..9c278ff19 100644
--- a/lib/db/db_version_migration.dart
+++ b/lib/db/db_version_migration.dart
@@ -12,7 +12,6 @@ import 'package:isar/isar.dart';
import 'package:tuple/tuple.dart';
import '../app_config.dart';
-import '../electrumx_rpc/electrumx_client.dart';
import '../models/contact.dart';
import '../models/exchange/change_now/exchange_transaction.dart';
import '../models/exchange/response_objects/trade.dart';
@@ -22,7 +21,6 @@ import '../models/isar/models/isar_models.dart' as isar_models;
import '../models/models.dart';
import '../models/node_model.dart';
import '../services/mixins/wallet_db.dart';
-import '../services/node_service.dart';
import '../services/wallets_service.dart';
import '../utilities/amount/amount.dart';
import '../utilities/constants.dart';
@@ -50,107 +48,11 @@ class DbVersionMigrator with WalletDB {
case 0:
await DB.instance.hive.openBox(DB.boxNameAllWalletsData);
await DB.instance.hive.openBox(DB.boxNamePrefs);
- final walletsService = WalletsService();
- final nodeService = NodeService(secureStorageInterface: secureStore);
final prefs = Prefs.instance;
- final walletInfoList = await walletsService.walletNames;
await prefs.init();
- ElectrumXClient? client;
- int? latestSetId;
-
- final firo = Firo(CryptoCurrencyNetwork.main);
- // only instantiate client if there are firo wallets
- if (walletInfoList.values
- .any((element) => element.coinIdentifier == firo.identifier)) {
- await DB.instance.hive.openBox(DB.boxNameNodeModels);
- await DB.instance.hive.openBox(DB.boxNamePrimaryNodes);
- final node =
- nodeService.getPrimaryNodeFor(currency: firo) ?? firo.defaultNode;
- final List failovers = nodeService
- .failoverNodesFor(currency: firo)
- .map(
- (e) => ElectrumXNode(
- address: e.host,
- port: e.port,
- name: e.name,
- id: e.id,
- useSSL: e.useSSL,
- torEnabled: e.torEnabled,
- clearnetEnabled: e.clearnetEnabled,
- ),
- )
- .toList();
-
- client = ElectrumXClient.from(
- node: ElectrumXNode(
- address: node.host,
- port: node.port,
- name: node.name,
- id: node.id,
- useSSL: node.useSSL,
- torEnabled: node.torEnabled,
- clearnetEnabled: node.clearnetEnabled,
- ),
- prefs: prefs,
- failovers: failovers,
- cryptoCurrency: Firo(CryptoCurrencyNetwork.main),
- );
-
- try {
- latestSetId = await client.getLelantusLatestCoinId();
- } catch (e, s) {
- // default to 2 for now
- latestSetId = 2;
- Logging.instance.w(
- "Failed to fetch latest coin id during firo db migrate: $e \nUsing a default value of 2",
- error: e,
- stackTrace: s,
- );
- }
- }
-
- for (final walletInfo in walletInfoList.values) {
- // migrate each firo wallet's lelantus coins
- if (walletInfo.coinIdentifier == firo.identifier) {
- await DB.instance.hive.openBox(walletInfo.walletId);
- final _lelantusCoins = DB.instance.get(
- boxName: walletInfo.walletId,
- key: '_lelantus_coins',
- ) as List?;
- final List