diff --git a/.github/workflows/pr_test_build_android.yml b/.github/workflows/pr_test_build_android.yml
index 54b53cbb0..3743ed110 100644
--- a/.github/workflows/pr_test_build_android.yml
+++ b/.github/workflows/pr_test_build_android.yml
@@ -4,7 +4,6 @@ on:
pull_request:
jobs:
-
# -----------------------------------------
# PATH A: Internal PRs
internal-build:
diff --git a/.github/workflows/pr_test_build_linux.yml b/.github/workflows/pr_test_build_linux.yml
index c3e7ecd88..67438ed82 100644
--- a/.github/workflows/pr_test_build_linux.yml
+++ b/.github/workflows/pr_test_build_linux.yml
@@ -25,7 +25,7 @@ jobs:
steps:
- name: Fix github actions messing up $HOME...
- run: 'echo HOME=/root | sudo tee -a $GITHUB_ENV'
+ run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
- uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
@@ -94,6 +94,13 @@ jobs:
rm ./reown_flutter.tar.gz
popd
+ - name: Build Zcash Lib
+ run: |
+ set -x -e
+ pushd scripts/linux
+ ./build_zcash.sh
+ popd
+
- name: Execute Build and Setup Commands
run: |
pushd scripts/linux
@@ -108,7 +115,7 @@ jobs:
wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
unzip release-bundle.zip
rm release-bundle.zip
- unxz -fv release/*/*.xz
+ unxz -fv release/*/*.xz
popd
- name: Build Bitbox Flutter
@@ -138,7 +145,11 @@ jobs:
- name: Generate localization
run: |
dart run tool/generate_localization.dart
-
+ - name: Workaround zcash
+ run: |
+ mkdir -p scripts/zcash_lib/assets/
+ touch scripts/zcash_lib/assets/sapling-spend.params
+ touch scripts/zcash_lib/assets/sapling-output.params
- name: Build linux
run: |
flutter build linux --dart-define=hasDevOptions=true --release
@@ -154,15 +165,18 @@ jobs:
with:
path: ${{ github.workspace }}/build/linux/x64/release/cakewallet_linux.zip
name: cakewallet_linux
+ - name: Verify lint
+ run: |
+ exec env ABORT_ON_CHANGE=true ./scripts/lint.sh
- name: Prepare virtual desktop
if: ${{ contains(env.message, 'run tests') }}
run: |
- nohup Xvfb :99 -screen 0 720x1280x16 &
- echo DISPLAY=:99 | sudo tee -a $GITHUB_ENV
- dbus-daemon --system --fork
- nohup NetworkManager &
- nohup ffmpeg -framerate 60 -video_size 720x1280 -f x11grab -i :99 -c:v libx264 -c:a aac /opt/screen_grab.mkv &
+ nohup Xvfb :99 -screen 0 720x1280x16 &
+ echo DISPLAY=:99 | sudo tee -a $GITHUB_ENV
+ dbus-daemon --system --fork
+ nohup NetworkManager &
+ nohup ffmpeg -framerate 60 -video_size 720x1280 -f x11grab -i :99 -c:v libx264 -c:a aac /opt/screen_grab.mkv &
# Note for people adding tests:
# - Tests are ran on Linux, with some things being mocked out.
diff --git a/.github/workflows/reusable-build.yml b/.github/workflows/reusable-build.yml
index 08bf24d67..7c218970c 100644
--- a/.github/workflows/reusable-build.yml
+++ b/.github/workflows/reusable-build.yml
@@ -40,7 +40,7 @@ jobs:
steps:
- name: Fix github actions messing up $HOME...
- run: 'echo HOME=/root | sudo tee -a $GITHUB_ENV'
+ run: "echo HOME=/root | sudo tee -a $GITHUB_ENV"
- uses: actions/checkout@v4
with:
ref: ${{ inputs.ref }}
@@ -112,7 +112,7 @@ jobs:
# cleaning
rm -rf reown_flutter
rm -f reown_flutter.tar.gz
-
+
wget https://github.com/cake-tech/reown_flutter/releases/download/v0.0.4/reown_flutter-v0.0.4.tar.gz -O reown_flutter.tar.gz
mkdir reown_flutter
pushd reown_flutter
@@ -135,7 +135,7 @@ jobs:
wget https://github.com/MrCyjaneK/monero_c/releases/download/v0.18.4.0-RC9/release-bundle.zip
unzip release-bundle.zip
rm release-bundle.zip
- unxz -fv release/*/*.xz
+ unxz -fv release/*/*.xz
popd
- name: Build Bitbox Flutter
@@ -144,6 +144,12 @@ jobs:
pushd scripts
./build_bitbox_flutter.sh
popd
+ - name: Build Zcash Lib
+ run: |
+ set -x -e
+ pushd scripts/android
+ ./build_zcash.sh
+ popd
- name: Install Flutter dependencies
run: |
@@ -236,4 +242,4 @@ jobs:
cd build/app/outputs/flutter-apk
for i in arm64-v8a x86_64; do
../../../../scripts/android/check_16kb_align.sh app-$i-release.apk
- done
\ No newline at end of file
+ done
diff --git a/.gitignore b/.gitignore
index 5b17c0122..e9d8156de 100644
--- a/.gitignore
+++ b/.gitignore
@@ -144,6 +144,7 @@ lib/dogecoin/dogecoin.dart
lib/base/base.dart
lib/arbitrum/arbitrum.dart
lib/evm/evm.dart
+lib/zcash/zcash.dart
ios/Runner/Assets.xcassets/AppIcon.appiconset/Contents.json
ios/Runner/Assets.xcassets/AppIcon.appiconset/*.png
@@ -151,7 +152,7 @@ ios/Runner/Assets.xcassets/AppIcon.appiconset/*.png
ios/Runner/Info.plist
android/app/src/main/res/mipmap-*
android/app/src/main/res/drawable/ic_launcher.png
-!android/app/src/main/res/drawable/launch_background.xml
+!android/app/src/main/res/drawable/launch_background.xml
!android/app/src/main/res/values/styles.xml
assets/images/app_logo.png
@@ -215,4 +216,8 @@ flatpak-build/
**/linux/flutter/generated_plugins.cmake
scripts/torch_dart/
-fiat-check-output.txt
\ No newline at end of file
+fiat-check-output.txt
+scripts/zcash_lib
+scripts/android/yttrium
+scripts/bitbox_flutter
+scripts/reown_flutter
diff --git a/.gitmodules b/.gitmodules
deleted file mode 100644
index cdd040e65..000000000
--- a/.gitmodules
+++ /dev/null
@@ -1,6 +0,0 @@
-[submodule "inject.dart"]
- path = inject.dart
- url = https://github.com/google/inject.dart
-[submodule ".vendor/inject.dart"]
- path = .vendor/inject.dart
- url = https://github.com/google/inject.dart
diff --git a/android/app/src/main/AndroidManifestBase.xml b/android/app/src/main/AndroidManifestBase.xml
index 6b3b2cb2d..d2ffeef5f 100644
--- a/android/app/src/main/AndroidManifestBase.xml
+++ b/android/app/src/main/AndroidManifestBase.xml
@@ -39,7 +39,7 @@
android:versionName="__versionName__"
android:requestLegacyExternalStorage="true"
android:extractNativeLibs="true">
-
@@ -112,6 +112,8 @@
+
+
@@ -139,7 +141,7 @@
android:resource="@xml/provider_paths" />
-
+
diff --git a/assets/images/crypto/zcash.webp b/assets/images/crypto/zcash.webp
new file mode 100644
index 000000000..08f2ec3c2
Binary files /dev/null and b/assets/images/crypto/zcash.webp differ
diff --git a/assets/images/tx_shield.svg b/assets/images/tx_shield.svg
new file mode 100644
index 000000000..bf0073e0c
--- /dev/null
+++ b/assets/images/tx_shield.svg
@@ -0,0 +1 @@
+
\ No newline at end of file
diff --git a/assets/images/zec_icon.png b/assets/images/zec_icon.png
index 095ad2c56..009e174eb 100644
Binary files a/assets/images/zec_icon.png and b/assets/images/zec_icon.png differ
diff --git a/assets/images/zec_icon_qr.svg b/assets/images/zec_icon_qr.svg
new file mode 100644
index 000000000..54ceab824
--- /dev/null
+++ b/assets/images/zec_icon_qr.svg
@@ -0,0 +1,5 @@
+
diff --git a/assets/text/Release_Notes.txt b/assets/text/Release_Notes.txt
index 677268508..7858a57d8 100644
--- a/assets/text/Release_Notes.txt
+++ b/assets/text/Release_Notes.txt
@@ -1 +1,3 @@
+Add Zcash wallet
+Generic enhancements
Bug fixes
\ No newline at end of file
diff --git a/assets/zcash_node_list.yml b/assets/zcash_node_list.yml
new file mode 100644
index 000000000..88db5c54c
--- /dev/null
+++ b/assets/zcash_node_list.yml
@@ -0,0 +1,12 @@
+- uri: zec.rocks:443
+ is_default: false
+ useSSL: true
+ isEnabledForAutoSwitching: true
+- uri: zec-node.cakewallet.com:443
+ is_default: true
+ useSSL: true
+ isEnabledForAutoSwitching: true
+- uri: 2c4whzg26j6hgjh22rxynj3oig4gm22ga7x74weclujywxye23v3u5id.onion:9067
+ useSSL: false
+- uri: bvp2l442g5ogma7rywzahm7eqyhpp3g26n3gvvxeioqn5csio2ir6myd.onion:9067
+ useSSL: false
diff --git a/cw_bitcoin/pubspec.lock b/cw_bitcoin/pubspec.lock
index c4b45c776..90dbdf60f 100644
--- a/cw_bitcoin/pubspec.lock
+++ b/cw_bitcoin/pubspec.lock
@@ -604,8 +604,8 @@ packages:
dependency: "direct main"
description:
path: "packages/ledger-bitcoin"
- ref: dc42621f55702d0732681afc2f90bc0047f26633
- resolved-ref: dc42621f55702d0732681afc2f90bc0047f26633
+ ref: "75bba8632c529debf30ee2b1858530009fa6440b"
+ resolved-ref: "75bba8632c529debf30ee2b1858530009fa6440b"
url: "https://github.com/cake-tech/ledger-flutter-plus-plugins"
source: git
version: "0.0.3"
diff --git a/cw_core/lib/crypto_currency.dart b/cw_core/lib/crypto_currency.dart
index b581e803f..82451f228 100644
--- a/cw_core/lib/crypto_currency.dart
+++ b/cw_core/lib/crypto_currency.dart
@@ -62,7 +62,6 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
CryptoCurrency.hbar,
CryptoCurrency.sc,
CryptoCurrency.usdcsol,
- CryptoCurrency.zaddr,
CryptoCurrency.zec,
CryptoCurrency.zen,
CryptoCurrency.xvg,
@@ -140,6 +139,10 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
xusd,
];
+ // well technically not currencies but since we had them a long time ago and don't want to break
+ // the app for users who had contacts saved for them
+ static const zcashCurrencies = [ zec, zaddr, tzec ];
+
// title, tag (if applicable), fullName (if unique), raw, name, iconPath
static const xmr = CryptoCurrency(title: 'XMR', fullName: 'Monero', raw: 0, name: 'xmr', iconPath: 'assets/images/crypto/monero.webp', decimals: 12);
static const ada = CryptoCurrency(title: 'ADA', fullName: 'Cardano', raw: 1, name: 'ada', iconPath: 'assets/images/ada_icon.png', decimals: 6);
@@ -186,7 +189,7 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
static const usdc = CryptoCurrency(title: 'USDC', tag: 'ETH', fullName: 'USD Coin', raw: 40, name: 'usdc', iconPath: 'assets/images/crypto/usdc.webp', decimals: 6);
static const usdcsol = CryptoCurrency(title: 'USDC', tag: 'SOL', fullName: 'USDC Coin', raw: 41, name: 'usdcsol', iconPath: 'assets/images/crypto/usdc.webp', decimals: 6);
static const zaddr = CryptoCurrency(title: 'ZZEC', tag: 'ZEC', fullName: 'Shielded Zcash', raw: 42, name: 'zaddr', iconPath: 'assets/images/zec_icon.png', decimals: 8);
- static const zec = CryptoCurrency(title: 'TZEC', tag: 'ZEC', fullName: 'Transparent Zcash', raw: 43, name: 'zec', iconPath: 'assets/images/zec_icon.png', decimals: 8);
+ static const tzec = CryptoCurrency(title: 'tZEC', tag: 'ZEC', fullName: 'Transparent Zcash', raw: 43, name: 'zec', iconPath: 'assets/images/zec_icon.png', decimals: 8);
static const zen = CryptoCurrency(title: 'ZEN', fullName: 'Horizen', raw: 44, name: 'zen', iconPath: 'assets/images/zen_icon.png', decimals: 8);
static const xvg = CryptoCurrency(title: 'XVG', fullName: 'Verge', raw: 45, name: 'xvg', iconPath: 'assets/images/xvg_icon.png', decimals: 8);
@@ -250,23 +253,24 @@ class CryptoCurrency extends EnumerableItem with Serializable implemen
static const cbbtc = CryptoCurrency(title: 'CBBTC', tag: 'ETH', fullName: 'Coinbase Wrapped BTC', raw: 103, name: 'cbbtc', iconPath: 'assets/images/cbbtc_icon.png', decimals: 8);
static const baseEth = CryptoCurrency(title: 'ETH', tag: 'BASE', fullName: 'Ethereum', raw: 104, name: 'baseth', iconPath: 'assets/images/crypto/base_icon.webp', decimals: 18);
static const usde = CryptoCurrency(title: 'USDE', tag: 'BASE', fullName: 'Ethena USDE', raw: 105, name: 'usde', iconPath: 'assets/images/crypto/ethena-usde-logo.png', decimals: 18);
- static const arbEth = CryptoCurrency(title: 'ETH', tag: 'ARB', fullName: 'Ethereum (Arbitrum One)', raw: 106, name: 'arbeth', iconPath: 'assets/images/crypto/ethereum.webp', decimals: 18);
- static const usdcArb = CryptoCurrency(title: 'USDC', tag: 'ARB', fullName: 'USDC Coin', raw: 107, name: 'usdcarb', iconPath: 'assets/images/crypto/usdc.webp', decimals: 6);
+ static const arbEth = CryptoCurrency(title: 'ETH', tag: 'ARB', fullName: 'Ethereum (Arbitrum One)', raw: 106, name: 'arbeth', iconPath: 'assets/images/crypto/ethereum.webp', decimals: 18);
+ static const zec = CryptoCurrency(title: 'ZEC', fullName: 'Zcash', raw: 107, name: 'zec', iconPath: 'assets/images/zec_icon.png', decimals: 8);
+ static const usdcArb = CryptoCurrency(title: 'USDC', tag: 'ARB', fullName: 'USDC Coin', raw: 108, name: 'usdcarb', iconPath: 'assets/images/crypto/usdc.webp', decimals: 6);
static final Map _rawCurrencyMap =
- [...all, ...havenCurrencies].fold