Compare commits

...

29 Commits
v1.0.0 ... main

Author SHA1 Message Date
onryo 21d145062c rm backend server 1 month ago
fekt a6dd5c86cf Bump version 2 months ago
fekt ec34f6b0f7 Merge pull request 'Merge dev' (#18) from dev into main 7 months ago
fekt 85c5adf25a Bump version 8 months ago
fekt c89b62adb9 Merge pull request 'Fix for split builds' (#17) from fekt/hush-android-wallet:main into main 10 months ago
fekt 3ee3dbe30a Merge branch 'main' into main 10 months ago
fekt a27037e462 Fix for split builds 10 months ago
fekt f25e94b6b9 Merge pull request 'main' (#16) from fekt/hush-android-wallet:main into main 10 months ago
fekt 9664111c05 Bump release version 10 months ago
fekt 8962e82363 64-bit splits 10 months ago
fekt 01491aaba3 Adding some build notes/instructions 11 months ago
fekt cb009f6b0a Merge pull request 1 year ago
fekt c7e3ec8e8e Updating copyright year 1 year ago
fekt 2b22483741 Updated server list 1 year ago
fekt 22d6721d03 More Street Mode 1 year ago
fekt 8f52977c73 Updating translations 1 year ago
fekt becad732ef Another string 1 year ago
fekt fe6aae23de Updating some strings 1 year ago
fekt 8bd87998d6 5t34L tH353 fUND$ 1 year ago
fekt 26fcd91546 Updated server list 1 year ago
fekt 9a6c809b09 Street Mode 1 year ago
fekt e6fd1d1e23 Populate amt and memo when scanning QR 1 year ago
fekt 565cd84761 QR code fix for hush: 1 year ago
fekt 8a0a0216b4 Update fragment_settings.xml 1 year ago
fekt 613ce03f6d Deleting Zcash checkpoints 1 year ago
fekt b2e0f8d717 QR scanning changes 1 year ago
fekt c9ac523935 Friendlier error handling for unavailable server 1 year ago
fekt b7349c3d09 Bump version, dev wallet birthday, and SDK renaming 1 year ago
fekt e274d28ba2 Random server support 1 year ago
  1. 73
      .gitignore
  2. 45
      README.md
  3. 17
      app/build.gradle
  4. 7
      app/src/main/assets/saplingtree/mainnet/1225600.json
  5. 7
      app/src/main/assets/saplingtree/mainnet/1250000.json
  6. 7
      app/src/main/assets/saplingtree/mainnet/1290000.json
  7. 7
      app/src/main/assets/saplingtree/mainnet/1300000.json
  8. 7
      app/src/main/assets/saplingtree/mainnet/1335000.json
  9. 7
      app/src/main/assets/saplingtree/testnet/1380300.json
  10. 7
      app/src/main/assets/saplingtree/testnet/1450000.json
  11. 7
      app/src/main/assets/saplingtree/testnet/1454000.json
  12. 4
      app/src/main/java/cash/z/ecc/android/di/DependenciesHolder.kt
  13. 18
      app/src/main/java/cash/z/ecc/android/ext/Const.kt
  14. 22
      app/src/main/java/cash/z/ecc/android/ext/Dialogs.kt
  15. 46
      app/src/main/java/cash/z/ecc/android/ui/home/HomeFragment.kt
  16. 46
      app/src/main/java/cash/z/ecc/android/ui/scan/ScanFragment.kt
  17. 4
      app/src/main/java/cash/z/ecc/android/ui/scan/ScanViewModel.kt
  18. 24
      app/src/main/java/cash/z/ecc/android/ui/settings/SettingsFragment.kt
  19. 1
      app/src/main/java/cash/z/ecc/android/ui/settings/SettingsViewModel.kt
  20. 2
      app/src/main/java/cash/z/ecc/android/ui/setup/LandingFragment.kt
  21. 6
      app/src/main/java/cash/z/ecc/android/ui/setup/WalletSetupViewModel.kt
  22. 2
      app/src/main/res/layout/fragment_profile.xml
  23. 97
      app/src/main/res/layout/fragment_settings.xml
  24. 10
      app/src/main/res/values-es/translated.xml
  25. 10
      app/src/main/res/values-it/translated.xml
  26. 12
      app/src/main/res/values-ko/translated.xml
  27. 12
      app/src/main/res/values-ru/translated.xml
  28. 14
      app/src/main/res/values-zh/translated.xml
  29. 12
      app/src/main/res/values/translated.xml
  30. 10
      buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt

73
.gitignore

@ -0,0 +1,73 @@
# Built application files
*.apk
*.ap_
# Built libraries
#*.aar
# *.so
# Files for the ART/Dalvik VM
*.dex
# Java class files
*.class
# Generated files
bin/
gen/
out/
target/
# Gradle files
.gradle/
build/
# Local configuration file (sdk path, etc)
local.properties
.DS_Store
# Proguard folder generated by Eclipse
proguard/
# Log Files
*.log
# Android Studio Navigation editor temp files
.navigation/
# Android Studio captures folder
captures/
# IntelliJ
*.iml
.idea
# Keystore files
*.jks
# External native build folder generated in Android Studio 2.2 and later
.externalNativeBuild
# Google Services (e.g. APIs or Firebase)
# allow our dummy file to live in the repo to make building easier
#google-services.json
# Freeline
freeline.py
freeline/
freeline_project_description.json
# fastlane
fastlane/report.xml
fastlane/Preview.html
fastlane/screenshots
fastlane/test_output
fastlane/readme.md
# rust
.cargo/
# misc.
backup/
.editorconfig

45
README.md

@ -1,4 +1,4 @@
# hush-android-wallet
# SilentDragonAndroid
A sample Android wallet using the [Hush Android SDK](https://git.hush.is/hush/hush-android-wallet-sdk) which is based on the [Zcash Android SDK](https://github.com/zcash/zcash-android-wallet-sdk).
### Motivation
@ -23,24 +23,39 @@ This a sample wallet for the following set of features:
- reply-to formatted memos
# Prerequisites
- [The code](https://git.hush.is/hush/hush-android-wallet)
- [Android Studio](https://developer.android.com/studio/index.html) or [adb](https://www.xda-developers.com/what-is-adb/)
- [The app code](https://git.hush.is/hush/SilentDragonAndroid/)
- [The SDK code](https://git.hush.is/hush/hush-android-wallet-sdk)
- [Android Studio](https://developer.android.com/studio/index.html) last tested with Android Studio Dolphin | 2021.3.1 Patch 1 or [adb](https://www.xda-developers.com/what-is-adb/)
- An Android device or emulator. Android 10 or higher is recommended.
# Building the App
To run, clone the repo, open it in Android Studio and press play. It should just work.™
1. Clone the SDK:
```git clone https://git.hush.is/hush/hush-android-wallet-sdk.git```
2. Add any new checkpoints to the SDK - Checkpoints are located in ```hush-android-wallet-sdk\sdk-lib\src\main\assets\co.electriccoin.zcash\checkpoint\mainnet``` You may use the [sda_checkpoints.pl](https://git.hush.is/hush/hush3/src/branch/dev/contrib/sda_checkpoints.pl) script and modify the start and end block heights accordingly.
By default, this script will generate many checkpoints in a single file IE: ```./contrib/sda_checkpoints.pl > newcheckpoints.json```. You may then copy/paste to individual .json files named as the block height the checkpoint is for or modify this script to save individual .json files for each block height.
3. Compile and publish the SDK locally as the app's code currently relies on mavenLocal for the SDK.
```
./gradlew clean
./gradlew build
./gradlew build publishToMavenLocal
```
4. Clone the app repo:
```git clone https://git.hush.is/hush/SilentDragonAndroid.git```
5. Open the app in Android Studio and press play to install and run on connected device. It should just work.™
6. If you want to build APKs instead of installing on a device or emulator, select Build > Build Bundle(s) / APK(s) > Build APK(s)
## Install from Android Studio
1. [Install Android Studio](https://developer.android.com/studio/install) and setup an emulator
1a. If using a device, be sure to [put it in developer mode](https://developer.android.com/studio/debug/dev-options) to enable side-loading apps
2. `Import` the hush-android-wallet folder.
2. `Import` the SilentDragonAndroid folder.
It will be recognized as an Android project.
3. Press play (once it is done opening and indexing)
## OR Install from the command line
To build from the command line, [setup ADB](https://www.xda-developers.com/install-adb-windows-macos-linux/) and connect your device. Then simply run this and it will both build and install the app:
```bash
cd /path/to/hush-android-wallet
cd /path/to/SilentDragonAndroid
./gradlew
```
Note: The lack of an explicit Gradle task is not a typo. A default task is configured via [build.gradle.kts](build.gradle.kts).
@ -49,20 +64,20 @@ Tip: On macOS and Linux, Gradle is invoked with `./gradlew`. On Windows, Gradle
# Included builds
To simplify implementation of SDK features in conjunction with changes to the app, a Gradle [Included Build](https://docs.gradle.org/current/userguide/composite_builds.html) can be configured.
These notes are included from upstream and for reference only if looking to create an included build. To simplify implementation of SDK features in conjunction with changes to the app, a Gradle [Included Build](https://docs.gradle.org/current/userguide/composite_builds.html) can be configured.
1. Check out the SDK to a directory path of `../hush-android-sdk` relative to the root of this app's repo. For example:
1. Check out the SDK to a directory path of `../hush-android-wallet-sdk` relative to the root of this app's repo. For example:
parent/
hush-android-wallet/
hush-android-sdk/
SilentDragonAndroid/
hush-android-wallet-sdk/
1. Verify that the `hush-android-sdk` builds correctly on its own
1. Build `hush-android-wallet`, setting the Gradle property `IS_SDK_INCLUDED_BUILD=true`
1. Verify that the `hush-android-wallet-sdk` builds correctly on its own
1. Build `SilentDragonAndroid`, setting the Gradle property `IS_SDK_INCLUDED_BUILD=true`
There are some limitations of included builds:
1. Properties from `hush-android-wallet` will override those set in `hush-android-sdk` with the same name
1. Modules in each project cannot share the same name. For this reason, build-conventions have different names in each repo (`hush-android-sdk/build-conventions` vs `other-android-wallet/build-convention`)
1. Properties from `SilentDragonAndroid` will override those set in `hush-android-wallet-sdk` with the same name
1. Modules in each project cannot share the same name. For this reason, build-conventions have different names in each repo (`hush-android-wallet-sdk/build-conventions` vs `other-android-wallet/build-convention`)
1. Kotlin and KSP versions will need to be coordinated between the two projects, because KSP is tightly coupled to the Kotlin version
# Contributing
@ -75,7 +90,7 @@ Contact us on [Telegram](https://hush.is/tg) or [Matrix](https://hush.is/matrix)
# Copyright
Copyright 2016-2022 The Hush developers
Copyright 2016-2023 The Hush developers
# License

17
app/build.gradle

@ -30,6 +30,14 @@ android {
// per https://google.github.io/android-gradle-dsl/current/com.android.build.gradle.internal.dsl.VectorDrawablesOptions.html: If set to an empty collection, all special handling of vector drawables will be disabled.
vectorDrawables.generatedDensities = []
}
splits {
abi {
enable true
reset()
universalApk true
include "armeabi-v7a", "x86", "arm64-v8a", "x86_64"
}
}
buildFeatures {
viewBinding true
}
@ -110,11 +118,8 @@ android {
}
namespace 'cash.z.ecc.android'
applicationVariants.all { variant ->
variant.outputs.all {
if (variant.buildType.name == "qa") {
it.versionNameOverride = "${Deps.versionName}-QA"
}
outputFileName = "$archivesBaseName-v${Deps.versionName}-${variant.buildType.name}.apk"
variant.outputs.all { output ->
outputFileName = "$archivesBaseName-v${Deps.versionName}-${variant.buildType.name}-${output.getFilter("ABI")}.apk"
}
}
}
@ -144,7 +149,7 @@ dependencies {
implementation Deps.AndroidX.PAGING
implementation Deps.AndroidX.RECYCLER
def camerax_version = "1.2.0-rc01"
def camerax_version = "1.1.0"
implementation "androidx.camera:camera-core:${camerax_version}"
implementation "androidx.camera:camera-camera2:${camerax_version}"
implementation "androidx.camera:camera-lifecycle:${camerax_version}"

7
app/src/main/assets/saplingtree/mainnet/1225600.json

@ -1,7 +0,0 @@
{
"network": "main",
"height": 1225600,
"hash": "0000000000196bafb2472eb7a3b1aa85bccc00904d5650a7952dd437859fc38c",
"time": 1619215931,
"tree": "0128411e8cb2f543c46ca943736c96ab4fa86cab1e3e2e394ed458d56b395bd5050120303bbaf4f19e37a06c1e9ea815567fc23990cc65494c2be29f8e6e4a9d9a6c130001010e9388fdf9bf49e3adf4adb57d83e0b5ba34f63a2681eceb54d3aaaf236b210001c0920d177f77815c4f643c2b331bd6b86d291d6bc2c1c20f6bc501f49adcdb3b000001b7958828206f53c25465943d4173af16de3cee94ae01b2e17a32c51c06fde3630001b31ed2e29d0d894604f0d7bf4735d4bcf25dc9f859c5e296a5689af7ca8c94720134ca9a7c4309349dfe003f3b4b95898b4303631e9be3a25b4e917a4f3472b52f00000121c25bceccda091622bfac1b7973ffaa638abe1f334b3b56f48dc93dc549c9070001ece344ca21dbd3b681f167163d4792165efe8239390afc13378e50d044fee65a01089a1f9d50a037cc66aba4400b1703bcbb66f5f2993fd0dd3bb726e35940916700000118f64df255c9c43db708255e7bf6bffd481e5c2f38fe9ed8f3d189f7f9cf2644"
}

7
app/src/main/assets/saplingtree/mainnet/1250000.json

@ -1,7 +0,0 @@
{
"network": "main",
"height": 1250000,
"hash": "0000000000f3d2c352c395d66866032bcb67094228dd4a27e561b1c399ea612e",
"time": 1621056898,
"tree": "01c9a0dd6f6dfaaafe6ae4b432c2d1c41d2a73e564c8cb6d2c5ab637c7001a2456001300000000017da32b486a8ea9f13afb93b99d2b1de69aa969e7c2fd7b9ee958bece70c08d6b000001b3a4486b176dfcedc0b3d9287c0333ff464ecbd02bac7c89bcda7932e6a0a36100010d451c18b56877b8a11cb401ab7024c82b9669ede862a53e461087f57220035001a1c5260bc4dfe010510b8135209c6f64229965f71717f1e693abdcf88a58f36700012f0bf70e372e536fc3b76ecd7e2b69eebf2fbcf71b828c64b0a8b99390fbf754018e7922ca798cd3e26d3369ca2425ec19baa7d79407a979ec1090ae48fdcd094a01ece344ca21dbd3b681f167163d4792165efe8239390afc13378e50d044fee65a01089a1f9d50a037cc66aba4400b1703bcbb66f5f2993fd0dd3bb726e35940916700000118f64df255c9c43db708255e7bf6bffd481e5c2f38fe9ed8f3d189f7f9cf2644"
}

7
app/src/main/assets/saplingtree/mainnet/1290000.json

@ -1,7 +0,0 @@
{
"network": "main",
"height": 1290000,
"hash": "00000000014836c3cbc011276cbd3702a76a1fea7eb2c0c2c257321220376450",
"time": 1624075741,
"tree": "01accf4fc3dc4233bbe757f94e0d4cd23b4aa2e6ac472601f4f53ca4dc86a8a05901fae977171a6103a0338990e073ffe50e29fc8bf0400dcd3378ebfe7a146ed1481300014f7b33dd5159ac66f2670b7db8925065e7154e0199ff7ee7559b276ba56ad1200173e9881f21357e54027a4275114f0f6ad4ca17143554182f63c77f3288a23a20011d65465ab942440e200d429ef892452b4b05c5b21e9a6e6d968a719c67b5e85b000000000000000150926c74975e2d8ff095defb75a4a6d9f17007e87a74230a65a3265d8f45032900012ffde6dccbef68b60cd7b4e7a8fe7989f5954fa4bacad01b247d16b9bfa5084000000125911f4524469c00ccb1ba69e64f0ee7380c8d17bbfc76ecd238421b86eb6e09000118f64df255c9c43db708255e7bf6bffd481e5c2f38fe9ed8f3d189f7f9cf2644"
}

7
app/src/main/assets/saplingtree/mainnet/1300000.json

@ -1,7 +0,0 @@
{
"network": "main",
"height": 1300000,
"hash": "00000000027222bdbcf9c5f807f851f97312ac6e0dbbc2b93f2be21a69c59d44",
"time": 1624830312,
"tree": "01f5a97e2679a2bb9103caf37b825f92fcd73fff836234844dfcf1815394522b2c01526587b9b9e8aeb0eb572d81fec1f5127b8278ba0f57e451bd6b796596940a2213000131c7ff90fafff6159b8fb6544a2bcbba6c102903158fce8f9a9d3c6654abb23300013555cb7f4f79badeaca9bf2dca5a8704f0929053d50e95c03002f9a4d5286c3a01ad3557e11c1607ec888dc84f5f8899c3c79fb1f50b613946452ec7dd5e53763c0001c4583f4482b949390dba355fc8fa63019c83acd644ddd633cb50211d236f870600000001088da0d78eefd0c222507927e403b972d0890d0c31e08b02268fbe39ac4a6e170001edf82d4e2b4893ea2028ca8c5149e50a4c358b856d73f2de2b9a22034fa78f22012ffde6dccbef68b60cd7b4e7a8fe7989f5954fa4bacad01b247d16b9bfa5084000000125911f4524469c00ccb1ba69e64f0ee7380c8d17bbfc76ecd238421b86eb6e09000118f64df255c9c43db708255e7bf6bffd481e5c2f38fe9ed8f3d189f7f9cf2644"
}

7
app/src/main/assets/saplingtree/mainnet/1335000.json

@ -1,7 +0,0 @@
{
"network": "main",
"height": 1335000,
"hash": "00000000001d428474214f2844ac7adacab9c9b706f89ebb24e1e43189edff2d",
"time": 1627468889,
"tree": "01105d94f868041b1680f862dad6211ab815a30c79a63b839c2b2043ce6530834801e53ee3fef11ddfaef984c8653dffa0354929b79aad7321b00c10cb3b60c8b7111301f5693ff9b17a8fc0b032c192841d1fc08b7ec9fe4fcc2b628a550434af70886a01838a7001b5ed5dcdec7bce1ea4250bbeebe8c22aa27fd69e7baf343458e95c7101030f11dfda75a9e4a63bab19fe3bf92c545a3f58a57ca41ae7609290dad01436018923004af490f5718e834215ef61f2f60aee24685c1c2cffb3c686dff57ab82501eb86680f83fa0f9c47da3875645344a2734d56edcf1d99747ecbf25ea0e86e22000001cf6872911593b4f1af2fd03dce8a48d434af849ad1bc872442e7881bbc04e8610168fbde909e21c25e1a686fac9982ee11fb0d05da3568579bfba8b71f7632d62700012965494015cdab2ce010c1ae4ea88306c286128275de391dcf57d3fa85be7e1b01a090ee174239a34a5d684425d09006d238c6075a61c5842d0fc26043f09ccd7001a2b7ee187c7b8ce18ebda8600bed7695b12f7d35ac971ed6ee67184a7ceebd490001b35fe4a943a47404f68db220c77b0573e13c3378a65c6f2396f93be7609d8f2a000125911f4524469c00ccb1ba69e64f0ee7380c8d17bbfc76ecd238421b86eb6e09000118f64df255c9c43db708255e7bf6bffd481e5c2f38fe9ed8f3d189f7f9cf2644"
}

7
app/src/main/assets/saplingtree/testnet/1380300.json

@ -1,7 +0,0 @@
{
"network": "test",
"height": 1380300,
"hash": "00342c648fb9c5d109df4dd5b7849a4357f27f1dfdb8d3a0071e8254072d1a4a",
"time": 1619216615,
"tree": "01f5b47ef533c9b6240826210d7e66691f36b21ac1ce1e4a231399ff4f8b1286600198dc26bbe8f037c5dbd8a43e94c482bb513898bd1ee1a734c07c57450b9ec01b1000000001b18e52aa826dcf85a08ae15d1bb4c8559166fcd5cffd74b597a8b50bf32d311100018dc0c02e20384fcdc238a6c01a0e4598da69f546646acc177fd91b86a0f8236200000001ba0d7aa9e68417291c63b835fa64114f5899208238de59ee360f594c8b6c1b72018469338dcbdf2f7e54bca5bc3e1c5fad4a656f206040436d3d0433a901218b5e016d559de7a1a382349cf97fe01a2fba41a49bb5e3b306d9ff8c2bcc301c731c00000001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39"
}

7
app/src/main/assets/saplingtree/testnet/1450000.json

@ -1,7 +0,0 @@
{
"network": "test",
"height": 1450000,
"hash": "000008a97bc133de13ca304e0c6a2a1b3f2facdceac2cde5b4141179f2a743cc",
"time": 1623815069,
"tree": "0175626cf9d8448de98f68fcc585dd7a276c946c11bbc3b192ee08db99c542b86b01acf5a110dc7ab911b534984c46bf56592f0c4cc8cf70dbd6a9cc4a5b47d2c81c1001c91f518ccb74093a217a640c537b69b095de058e0430046c8783f231caa1fa4201f7c982ce76b2c9343fb771e077357322f9a7dabfd7ab93b7adee32806c930d6600000170910ab6355ec614412fae56dad5fdc1747ce1b306a4b8ae03b77513b612b00800000000000000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39"
}

7
app/src/main/assets/saplingtree/testnet/1454000.json

@ -1,7 +0,0 @@
{
"network": "test",
"height": 1454000,
"hash": "003254b452f221d36ba81d051a1a63edeb203de7ab457500d08b4110bcc86620",
"time": 1624073536,
"tree": "01007501338f9d31446b9c0228b87e81886555100fbb1b5bec7966617559d5400901d830393653a5379f1f071bffa191f9b56d0664859d9b19b9e9ae4e1c76f7d34f1001ca92ad0eeb818c3bb57ca30ed500dd58703fe14c4837f14ac8a1491622f0a8550001a1d6a89c888e46ce950d5af54739e9847fab81f383586ad5dc51dd00f65ed85d0160f01e9c484861b220f5a4650119f192217a89854ada30019fae9ab46ff4c4120001462c8d06a58ddec91ed309dcb041cdedcca73446889496332054d54e1561633b000000000000013d2fd009bf8a22d68f720eac19c411c99014ed9c5f85d5942e15d1fc039e28680001f08f39275112dd8905b854170b7f247cf2df18454d4fa94e6e4f9320cca05f24011f8322ef806eb2430dc4a7a41c1b344bea5be946efc7b4349c1c9edb14ff9d39"
}

4
app/src/main/java/cash/z/ecc/android/di/DependenciesHolder.kt

@ -36,9 +36,5 @@ object DependenciesHolder {
}
}
val feedbackFile by lazy { FeedbackFile() }
val feedbackConsole by lazy { FeedbackConsole() }
val mnemonics by lazy { Mnemonics() }
}

18
app/src/main/java/cash/z/ecc/android/ext/Const.kt

@ -1,6 +1,7 @@
package cash.z.ecc.android.ext
import cash.z.ecc.android.BuildConfig
import kotlin.random.Random
object Const {
/**
@ -22,6 +23,7 @@ object Const {
const val FEEDBACK_ENABLED = "const.pref.feedback_enabled"
const val SERVER_HOST = "const.pref.server_host"
const val SERVER_PORT = "const.pref.server_port"
const val STREET_MODE = "const.pref.street_mode"
}
/**
@ -45,8 +47,20 @@ object Const {
*/
object Default {
object Server {
// If you've forked the ECC repo, change this to your hosted lightwalletd instance
const val HOST = BuildConfig.DEFAULT_SERVER_URL
// Select a random server from list
private val serverList = listOf(
"lite.hush.is",
"lite.hushpool.is",
"poop.granitefone.me",
"lite.myhush.org",
"wtfistheinternet.hush.is",
"lite.hush.land",
"lite2.hushpool.is"
)
private val randomIndex = Random.nextInt(serverList.size);
private val randomServer = serverList[randomIndex]
val HOST = randomServer
const val PORT = 443
}
}

22
app/src/main/java/cash/z/ecc/android/ext/Dialogs.kt

@ -4,10 +4,14 @@ import android.app.ActivityManager
import android.app.Dialog
import android.content.Context
import android.text.Html
import android.util.Log
import androidx.annotation.StringRes
import androidx.core.content.getSystemService
import cash.z.ecc.android.R
import cash.z.ecc.android.feedback.Report
import cash.z.ecc.android.ui.scan.ScanFragment
import com.google.android.material.dialog.MaterialAlertDialogBuilder
import kotlin.system.exitProcess
fun Context.showClearDataConfirmation(onDismiss: () -> Unit = {}, onCancel: () -> Unit = {}): Dialog {
return MaterialAlertDialogBuilder(this)
@ -88,6 +92,24 @@ fun Context.showCriticalMessage(@StringRes titleResId: Int, @StringRes messageRe
}
fun Context.showCriticalMessage(title: String, message: String, onDismiss: () -> Unit = {}): Dialog {
Log.d("SilentDragon", "showCriticalMessage called: $message")
var delimiter = ":"
val splitError = message.split(delimiter)
var pluckedError = splitError[0]
if(pluckedError == "UNAVAILABLE"){
return MaterialAlertDialogBuilder(this)
.setTitle("Server Unavailable")
.setMessage("Please close and restart the app to try another random server.")
.setCancelable(false)
.setNegativeButton("Exit") { dialog, _ ->
dialog.dismiss()
exitProcess(0)
}
.show()
}
return MaterialAlertDialogBuilder(this)
.setTitle(title)
.setMessage(message)

46
app/src/main/java/cash/z/ecc/android/ui/home/HomeFragment.kt

@ -15,6 +15,8 @@ import cash.z.ecc.android.R
import cash.z.ecc.android.ZcashWalletApp
import cash.z.ecc.android.databinding.DialogSolicitFeedbackRatingBinding
import cash.z.ecc.android.databinding.FragmentHomeBinding
import cash.z.ecc.android.di.DependenciesHolder
import cash.z.ecc.android.di.DependenciesHolder.lockBox
import cash.z.ecc.android.ext.*
import cash.z.ecc.android.feedback.Report
import cash.z.ecc.android.feedback.Report.Tap.*
@ -112,15 +114,19 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
)
hitAreaProfile.onClickNavTo(R.id.action_nav_home_to_nav_profile) { tapped(HOME_PROFILE) }
textHistory.onClickNavTo(R.id.action_nav_home_to_nav_history) { tapped(HOME_HISTORY) }
textSendAmount.onClickNavTo(R.id.action_nav_home_to_nav_balance_detail) {
tapped(
HOME_BALANCE_DETAIL
)
}
hitAreaBalance.onClickNavTo(R.id.action_nav_home_to_nav_balance_detail) {
tapped(
HOME_BALANCE_DETAIL
)
// Only allow viewing balance detail when not in Street Mode
if(!lockBox.getBoolean(Const.Pref.STREET_MODE)) {
textSendAmount.onClickNavTo(R.id.action_nav_home_to_nav_balance_detail) {
tapped(
HOME_BALANCE_DETAIL
)
}
hitAreaBalance.onClickNavTo(R.id.action_nav_home_to_nav_balance_detail) {
tapped(
HOME_BALANCE_DETAIL
)
}
}
hitAreaReceive.onClickNavTo(R.id.action_nav_home_to_nav_receive) { tapped(HOME_RECEIVE) }
@ -320,6 +326,15 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
else -> getString(R.string.home_instruction_enter_amount)
}
}
// Hide balance and history if Street Mode is enabled
if(lockBox.getBoolean(Const.Pref.STREET_MODE)) {
binding.textBalanceAvailable.visibility = View.INVISIBLE
binding.labelBalance.visibility = View.INVISIBLE
binding.textBalanceDescription.visibility = View.INVISIBLE
binding.textHistory.visibility = View.INVISIBLE
binding.textSendAmount.isEnabled = false
}
}
fun setBanner(message: String = "", action: BannerAction = CLEAR) {
@ -476,19 +491,6 @@ class HomeFragment : BaseFragment<FragmentHomeBinding>() {
mainActivity?.safeNavigate(R.id.action_nav_home_to_nav_receive)
}
.show()
// MaterialAlertDialogBuilder(activity)
// .setMessage("To make full use of this wallet, deposit funds to your address or tap the faucet to trigger a tiny automatic deposit.\n\nFaucet funds are made available for the community by the community for testing. So please be kind enough to return what you borrow!")
// .setTitle("No Balance")
// .setCancelable(true)
// .setPositiveButton("Tap Faucet") { dialog, _ ->
// dialog.dismiss()
// setBanner("Tapping faucet...", CANCEL)
// }
// .setNegativeButton("View Address") { dialog, _ ->
// dialog.dismiss()
// mainActivity?.safeNavigate(R.id.action_nav_home_to_nav_receive)
// }
// .show()
}
CANCEL -> {
// TODO: trigger banner / balance update

46
app/src/main/java/cash/z/ecc/android/ui/scan/ScanFragment.kt

@ -1,5 +1,6 @@
package cash.z.ecc.android.ui.scan
import android.net.UrlQuerySanitizer
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
@ -16,14 +17,14 @@ import androidx.window.layout.WindowMetricsCalculator
import cash.z.ecc.android.R
import cash.z.ecc.android.databinding.FragmentScanBinding
import cash.z.ecc.android.ext.onClickNavBack
import cash.z.ecc.android.sdk.ext.convertZecToZatoshi
import cash.z.ecc.android.sdk.ext.safelyConvertToBigDecimal
import cash.z.ecc.android.ui.base.BaseFragment
import cash.z.ecc.android.ui.send.SendViewModel
import kotlinx.coroutines.launch
import java.util.concurrent.ExecutorService
import java.util.concurrent.Executors
import kotlin.math.abs
import kotlin.math.max
import kotlin.math.min
class ScanFragment : BaseFragment<FragmentScanBinding>() {
@ -111,17 +112,14 @@ class ScanFragment : BaseFragment<FragmentScanBinding>() {
private fun bindCameraUseCases() {
// Get screen metrics used to setup camera for full screen resolution
/*
val metrics = WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(requireActivity()).bounds
Log.d("SilentDragon", "Screen metrics: ${metrics.width()} x ${metrics.height()}")
val screenAspectRatio = aspectRatio(metrics.width(), metrics.height())
*/
val windowMetrics = WindowMetricsCalculator.getOrCreate().computeCurrentWindowMetrics(requireActivity())
Log.d(TAG, "Screen metrics: ${windowMetrics.bounds.width()} x ${windowMetrics.bounds.height()}")
// Hardcode to square for now otherwise scanning doesn't work
val screenAspectRatio = aspectRatio(1, 1)
Log.d("SilentDragon", "Preview aspect ratio: $screenAspectRatio")
val screenAspectRatio = aspectRatio(windowMetrics.bounds.width(), windowMetrics.bounds.height())
Log.d(TAG, "Preview aspect ratio: $screenAspectRatio")
val rotation = fragmentCameraBinding.viewFinder.display.rotation
Log.d(TAG, "Rotation: $rotation")
// CameraProvider
val cameraProvider = cameraProvider
@ -298,7 +296,8 @@ class ScanFragment : BaseFragment<FragmentScanBinding>() {
* @return suitable aspect ratio
*/
private fun aspectRatio(width: Int, height: Int): Int {
val previewRatio = max(width, height).toDouble() / min(width, height)
val previewRatio = width.toDouble() / height
Log.d(TAG, "previewRatio: $previewRatio")
if (abs(previewRatio - RATIO_4_3_VALUE) <= abs(previewRatio - RATIO_16_9_VALUE)) {
return AspectRatio.RATIO_4_3
}
@ -323,17 +322,34 @@ class ScanFragment : BaseFragment<FragmentScanBinding>() {
}
private fun onQrScanned(qrContent: String, image: ImageProxy) {
//Log.d("SilentDragon", "QR scanned: $qrContent")
resumedScope.launch {
val parsed = viewModel.parse(qrContent)
if (parsed == null) {
val address = viewModel.parse(qrContent)
val sanitizer = UrlQuerySanitizer(qrContent)
val amt = sanitizer.getValue("amt")
val memo = sanitizer.getValue("memo")
/*
Log.d(TAG, "qrContent: $qrContent")
Log.d(TAG, "address: $address")
Log.d(TAG, "amt: $amt")
Log.d(TAG, "memo: $memo")
*/
if (address == null) {
val network = viewModel.networkName
_fragmentCameraBinding?.textScanError?.text =
getString(R.string.scan_invalid_address, network, qrContent)
image.close()
} else { /* continue scanning*/
_fragmentCameraBinding?.textScanError?.text = ""
sendViewModel.toAddress = parsed
sendViewModel.toAddress = address
if(amt!=null){
sendViewModel.zatoshiAmount =
amt.safelyConvertToBigDecimal().convertZecToZatoshi()
}
if(memo!=null){
sendViewModel.memo = memo
}
mainActivity?.safeNavigate(R.id.action_nav_scan_to_nav_send)
}
}

4
app/src/main/java/cash/z/ecc/android/ui/scan/ScanViewModel.kt

@ -1,5 +1,6 @@
package cash.z.ecc.android.ui.scan
import android.util.Log
import androidx.lifecycle.ViewModel
import cash.z.ecc.android.di.DependenciesHolder
import cash.z.ecc.android.sdk.Synchronizer
@ -15,10 +16,11 @@ class ScanViewModel : ViewModel() {
// temporary parse code to allow both plain addresses and those that start with hush:
// TODO: replace with more robust ZIP-321 handling of QR codes
val address = if (qrCode.startsWith("hush:")) {
qrCode.substring(6, qrCode.indexOf("?").takeUnless { it == -1 } ?: qrCode.length)
qrCode.substring(5, qrCode.indexOf("?").takeUnless { it == -1 } ?: qrCode.length)
} else {
qrCode
}
Log.d("SilentDragon", "address: $address")
return if (synchronizer.validateAddress(address).isNotValid) null else address
}

24
app/src/main/java/cash/z/ecc/android/ui/settings/SettingsFragment.kt

@ -2,14 +2,18 @@ package cash.z.ecc.android.ui.settings
import android.content.res.ColorStateList
import android.os.Bundle
import android.util.Log
import android.view.LayoutInflater
import android.view.View
import android.widget.Toast
import androidx.core.view.ViewCompat.jumpDrawablesToCurrentState
import androidx.core.widget.doAfterTextChanged
import androidx.fragment.app.viewModels
import cash.z.ecc.android.R
import cash.z.ecc.android.ZcashWalletApp
import cash.z.ecc.android.databinding.FragmentSettingsBinding
import cash.z.ecc.android.di.DependenciesHolder.lockBox
import cash.z.ecc.android.di.DependenciesHolder.prefs
import cash.z.ecc.android.ext.*
import cash.z.ecc.android.sdk.exception.LightWalletException
import cash.z.ecc.android.sdk.ext.collectWith
@ -37,6 +41,15 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding>() {
hitAreaExit.onClickNavBack()
buttonReset.setOnClickListener(::onResetClicked)
buttonUpdate.setOnClickListener(::onUpdateClicked)
streetMode.setOnClickListener(::onStreetModeChecked)
val streetmode = lockBox.getBoolean(Const.Pref.STREET_MODE)
if(streetmode){
streetMode.isChecked = true
}
Log.d("SilentDragon", "streetMode: $streetmode")
buttonUpdate.isActivated = true
buttonReset.isActivated = true
inputHost.doAfterTextChanged {
@ -79,6 +92,17 @@ class SettingsFragment : BaseFragment<FragmentSettingsBinding>() {
}
}
private fun onStreetModeChecked(unused: View?) {
val streetmode = lockBox.getBoolean(Const.Pref.STREET_MODE)
Log.d("SilentDragon", "streetModeChecked! streetmode = $streetmode")
if(streetmode) {
lockBox.setBoolean(Const.Pref.STREET_MODE, false)
}
else{
lockBox.setBoolean(Const.Pref.STREET_MODE, true)
}
}
private fun onUiModelUpdated(uiModel: SettingsViewModel.UiModel) {
twig("onUiModelUpdated:::::$uiModel")
binding.apply {

1
app/src/main/java/cash/z/ecc/android/ui/settings/SettingsViewModel.kt

@ -1,5 +1,6 @@
package cash.z.ecc.android.ui.settings
import android.util.Log
import androidx.lifecycle.ViewModel
import cash.z.ecc.android.di.DependenciesHolder
import cash.z.ecc.android.ext.Const

2
app/src/main/java/cash/z/ecc/android/ui/setup/LandingFragment.kt

@ -142,7 +142,7 @@ class LandingFragment : BaseFragment<FragmentLandingBinding>() {
ZcashNetwork.Mainnet -> {
seedPhrase =
"still champion voice habit trend flight survey between bitter process artefact blind carbon truly provide dizzy crush flush breeze blouse charge solid fish spread"
birthday = BlockHeight.new(ZcashNetwork.Mainnet, 1170000) // 663174
birthday = BlockHeight.new(ZcashNetwork.Mainnet, 1270000)
}
ZcashNetwork.Testnet -> {
seedPhrase =

6
app/src/main/java/cash/z/ecc/android/ui/setup/WalletSetupViewModel.kt

@ -1,6 +1,7 @@
package cash.z.ecc.android.ui.setup
import android.content.Context
import android.util.Log
import androidx.lifecycle.ViewModel
import cash.z.ecc.android.ZcashWalletApp
import cash.z.ecc.android.di.DependenciesHolder
@ -91,6 +92,7 @@ class WalletSetupViewModel : ViewModel() {
* known by this point.
*/
private suspend fun loadConfig(): Initializer.Config {
twig("Loading config variables")
var overwriteVks = false
val network = ZcashWalletApp.instance.defaultNetwork
@ -100,6 +102,10 @@ class WalletSetupViewModel : ViewModel() {
val host = prefs[Const.Pref.SERVER_HOST] ?: Const.Default.Server.HOST
val port = prefs[Const.Pref.SERVER_PORT] ?: Const.Default.Server.PORT
Log.d("SilentDragon", "host: $host")
// TODO: Maybe check server availability here
twig("Done loading config variables")
return Initializer.Config {
it.importWallet(vk, birthdayHeight, network, LightWalletEndpoint(host, port, true))

2
app/src/main/res/layout/fragment_profile.xml

@ -225,7 +225,7 @@
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:text="© 2016-2022 The Hush Developers\nAll rights reserved. Licensed under GPLv3"
android:text="© 2016-2023 The Hush Developers\nAll rights reserved. Licensed under GPLv3"
android:textAlignment="center"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"

97
app/src/main/res/layout/fragment_settings.xml

@ -1,11 +1,27 @@
<?xml version="1.0" encoding="utf-8"?>
<androidx.constraintlayout.widget.ConstraintLayout
xmlns:android="http://schemas.android.com/apk/res/android"
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@drawable/background_home">
<View
android:id="@+id/loading_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/zcashWhite_24"
android:clickable="true"
android:elevation="8dp"
android:focusable="true"
android:focusableInTouchMode="true"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintHorizontal_bias="0.0"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.0" />
<androidx.constraintlayout.widget.Guideline
android:id="@+id/guideline_hit_area_top"
android:layout_width="wrap_content"
@ -31,7 +47,6 @@
android:layout_height="0dp"
android:contentDescription="@string/content_description_settings_back"
android:elevation="6dp"
app:tint="@color/text_light_dimmed"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintDimensionRatio="H,1:1"
app:layout_constraintEnd_toEndOf="parent"
@ -40,14 +55,15 @@
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintVertical_bias="0.065"
app:layout_constraintWidth_percent="0.08"
app:srcCompat="@drawable/ic_cancel" />
app:srcCompat="@drawable/ic_cancel"
app:tint="@color/text_light_dimmed" />
<TextView
android:id="@+id/text_title"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:layout_width="0dp"
android:layout_height="wrap_content"
style="@style/TextAppearance.MaterialComponents.Headline6"
android:maxLines="1"
android:text="@string/settings_change_lightwalletd_server"
android:textColor="@color/text_light"
@ -110,47 +126,52 @@
<com.google.android.material.button.MaterialButton
android:id="@+id/button_reset"
style="@style/Zcash.Button.OutlinedButton"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="16dp"
android:layout_marginEnd="16dp"
style="@style/Zcash.Button.OutlinedButton"
android:text="@string/settings_reset"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
android:textColor="@color/selector_secondary_button_activatable"
app:layout_constraintEnd_toStartOf="@id/button_update"
app:layout_constraintTop_toTopOf="@id/button_update"
app:layout_constraintTop_toBottomOf="@+id/text_input_layout_port"
app:strokeColor="@color/selector_secondary_button_activatable" />
<ProgressBar
android:id="@+id/loading_progress"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
app:layout_constraintBottom_toBottomOf="@id/button_reset"
app:layout_constraintStart_toStartOf="@id/icon_exit"
app:layout_constraintTop_toTopOf="@id/button_reset"
app:layout_constraintVertical_bias="0.0" />
<com.google.android.material.button.MaterialButton
android:id="@+id/button_update"
style="@style/Zcash.Button"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
style="@style/Zcash.Button"
android:layout_marginTop="16dp"
android:layout_marginEnd="4dp"
android:backgroundTint="@color/colorPrimary"
android:text="@string/settings_update"
android:textAppearance="@style/TextAppearance.MaterialComponents.Body1"
app:layout_constraintEnd_toEndOf="@id/text_input_layout_host"
app:layout_constraintTop_toBottomOf="@+id/text_input_layout_port" />
<View
android:id="@+id/loading_view"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:background="@color/zcashWhite_24"
android:clickable="true"
android:elevation="8dp"
android:focusable="true"
android:focusableInTouchMode="true" />
<ProgressBar
android:id="@+id/loading_progress"
android:layout_width="wrap_content"
<CheckBox
android:id="@+id/streetMode"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginEnd="12dp"
app:layout_constraintBottom_toBottomOf="@id/button_reset"
app:layout_constraintStart_toStartOf="@id/icon_exit"
app:layout_constraintTop_toTopOf="@id/button_reset" />
android:layout_marginStart="48dp"
android:layout_marginTop="16dp"
android:layout_marginEnd="48dp"
android:layoutDirection="rtl"
android:text="@string/translated_street_mode"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/textViewStreetMode" />
<androidx.constraintlayout.widget.Group
android:id="@+id/group_loading"
@ -158,5 +179,29 @@
android:layout_height="wrap_content"
app:constraint_referenced_ids="loading_progress,loading_view" />
<TextView
android:id="@+id/serverChangeNote"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginStart="48dp"
android:layout_marginTop="24dp"
android:layout_marginEnd="48dp"
android:text="@string/translated_server_note"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@id/button_update" />
<TextView
android:id="@+id/textViewStreetMode"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginTop="32dp"
android:text="Other Settings"
android:textSize="20sp"
android:textStyle="bold"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toBottomOf="@+id/serverChangeNote" />
</androidx.constraintlayout.widget.ConstraintLayout>

10
app/src/main/res/values-es/translated.xml

@ -11,7 +11,7 @@
<string name="translated_seed_restore">Restaurando desde frase de respaldo</string>
<string name="translated_seed_restoretext">Deberás ingresar todas las 24 palabras de tu frase semilla en orden</string>
<string name="translated_seed_reminder">¡Tus fondos están en riesgo!</string>
<string name="translated_seed_remindertext">Recuerda, en Zcash tu eres el banco. Cualquiera que tenga tu frase semilla podrá acceder a tu wallet</string>
<string name="translated_seed_remindertext">Recuerda, en HUSH tu eres el banco. Cualquiera que tenga tu frase semilla podrá acceder a tu wallet</string>
<string name="translated_seed_remindertext2">Deberías respaldar tu wallet inmediatamente. Solo tú puedes hacerlo.</string>
<string name="translated_seed_accepted">¡Frase semilla aceptada! ¡Escaneando!</string>
<string name="translated_seed_birthdaytext">Estamos buscando transacciones de tu wallet en la blockchain. Si nos provees una fecha inicial de tu wallet podemos hacerlo más rápido.</string>
@ -22,7 +22,7 @@
<string name="translated_button_skip">Omitir por ahora</string>
<string name="translated_balance_screen">Pantalla de Balance</string>
<string name="translated_balance_amounttosend">Ingresar un monto para enviar</string>
<string name="translated_balance_expecting">esperando XX ZEC</string>
<string name="translated_balance_expecting">esperando XX HUSH</string>
<string name="translated_balance_available">Disponible</string>
<string name="translated_balance_nofunds">No hay fondos disponibles</string>
<string name="translated_balance_syncing">Sincronizando .... %</string>
@ -45,7 +45,7 @@
<string name="translated_send_fromtransparent">de tu wallet transparente</string>
<string name="translated_send_fromboth">desde ambas wallet</string>
<string name="translated_label_to">A</string>
<string name="translated_feedback_default">Ingresa una dirección Zcash Válida</string>
<string name="translated_feedback_default">Ingresa una dirección HUSH Válida</string>
<string name="translated_feedback_shieldedaddress">Esta es una dirección blindada válida</string>
<string name="translated_feedback_transparentaddress">Esta es una dirección transparente válida</string>
<string name="translated_feedback_sameaddress">¡Cuidado, parece que esta es tu propia dirección!</string>
@ -58,8 +58,8 @@
<string name="translated_send_unknown">Desconocido</string>
<string name="translated_send_scanqr">Escanear Dirección destinatario</string>
<string name="translated_send_securityauth">Identifícate para enviar</string>
<string name="translated_send_securityauth2">Confirma que quieres enviar XX ZEC a</string>
<string name="translated_send_sending">Enviando XX ZEC a</string>
<string name="translated_send_securityauth2">Confirma que quieres enviar XX HUSH a</string>
<string name="translated_send_sending">Enviando XX HUSH a</string>
<string name="translated_send_cancelled">Cancelado</string>
<string name="translated_send_sent">¡Enviado!</string>
<string name="translated_button_done">Listo</string>

10
app/src/main/res/values-it/translated.xml

@ -4,7 +4,7 @@
<string name="translated_address_transparent">Il tuo indirizzo trasparente</string>
<string name="translated_balance_amounttosend">Inserisci un importo da inviare</string>
<string name="translated_balance_available">Disponibile</string>
<string name="translated_balance_expecting">aspettando %@ ZEC</string>
<string name="translated_balance_expecting">aspettando %@ HUSH</string>
<string name="translated_balance_nofunds">Nessun fondo disponibile</string>
<string name="translated_balance_screen">Bilancio</string>
<string name="translated_balance_syncing">Sincronizzando %@%%</string>
@ -22,7 +22,7 @@
<string name="translated_button_sendamount">Invia importo</string>
<string name="translated_button_skip">Salta per ora</string>
<string name="translated_button_wallethistory">cronologia del wallet</string>
<string name="translated_feedback_default">Inserisci un indirizzo Zcash valido</string>
<string name="translated_feedback_default">Inserisci un indirizzo HUSH valido</string>
<string name="translated_feedback_invalidaddress">Attenzione, questo indirizzo non è valido!</string>
<string name="translated_feedback_sameaddress">Attenzione, sembra che questo sia il tuo indirizzo!</string>
<string name="translated_feedback_shieldedaddress">Questo è un indirizzo blindato valido</string>
@ -39,7 +39,7 @@
<string name="translated_seed_birthdaytext">Stiamo cercando transazioni dal tuo wallet sulla blockchain. Se ci fornisci una data iniziale del tuo Wallet, possiamo farlo più velocemente.</string>
<string name="translated_seed_enterdate">inserici data</string>
<string name="translated_seed_reminder">I tuoi fondi sono a rischio!</string>
<string name="translated_seed_remindertext">Ricorda, in Zcash sei tu la banca. Chiunque abbia la tua frase seme può accedere al tuo Wallet</string>
<string name="translated_seed_remindertext">Ricorda, in HUSH sei tu la banca. Chiunque abbia la tua frase seme può accedere al tuo Wallet</string>
<string name="translated_seed_remindertext2">Dovresti eseguire immediatamente il backup del tuo portafoglio. Solo tu puoi farlo</string>
<string name="translated_seed_restore">recupero dalla frase di backup</string>
<string name="translated_seed_restoretext">Devi inserire tutte le 24 parole della tua frase seme in ordine</string>
@ -54,8 +54,8 @@
<string name="translated_send_scanqr">Scansione indirizzo destinatario</string>
<string name="translated_send_screen">Invio</string>
<string name="translated_send_securityauth">Accedi per inviare</string>
<string name="translated_send_securityauth2">Conferma che vuoi inviare %@ ZEC a</string>
<string name="translated_send_sending">Inviando %@ ZEC a</string>
<string name="translated_send_securityauth2">Conferma che vuoi inviare %@ HUSH a</string>
<string name="translated_send_sending">Inviando %@ HUSH a</string>
<string name="translated_send_sent">Inviato!</string>
<string name="translated_send_unknown">Sconosciuto</string>
<string name="translated_title_backupseed">Il tuo seme di backup</string>

12
app/src/main/res/values-ko/translated.xml

@ -1,5 +1,5 @@
<resources>
<string name="translated_app_name">ECC 지갑</string>
<string name="translated_app_name">SilentDragon</string>
<string name="translated_loadingtext">로딩</string>
<string name="translated_welcometext">환영</string>
<string name="translated_fiattext">₩ (currency = 통화)</string>
@ -11,7 +11,7 @@
<string name="translated_seed_restore">백업에서 복원</string>
<string name="translated_seed_restoretext">24 개의 시드 단어를 모두 순서대로 입력해야합니다.</string>
<string name="translated_seed_reminder">당신의 자금이 위험에 처해 있습니다</string>
<string name="translated_seed_remindertext">Zcash에서 당신은 은행이라는 것을 기억하십시오. 시드 문구가있는 사람은 누구나 지갑에 액세스 할 수 있습니다.</string>
<string name="translated_seed_remindertext">HUSH에서 당신은 은행이라는 것을 기억하십시오. 시드 문구가있는 사람은 누구나 지갑에 액세스 할 수 있습니다.</string>
<string name="translated_seed_remindertext2">다른 사람이 대신 백업 할 수 없으므로 즉시 백업해야합니다.</string>
<string name="translated_seed_accepted">시드 수락, 지금 스캔!</string>
<string name="translated_seed_birthdaytext">지갑에 대한 거래를 위해 블록 체인을 스캔하고 있습니다. 이 지갑의 생일 날짜를 제공 할 수 있다면 동기화 속도를 높일 수 있습니다.</string>
@ -22,7 +22,7 @@
<string name="translated_button_skip">일단은 스킵</string>
<string name="translated_balance_screen">밸런스 화면</string>
<string name="translated_balance_amounttosend">보낼 금액 입력</string>
<string name="translated_balance_expecting">기대 XX ZEC</string>
<string name="translated_balance_expecting">기대 XX HUSH</string>
<string name="translated_balance_available">사용 가능</string>
<string name="translated_balance_nofunds">사용할 수있는 자금 없습니다</string>
<string name="translated_balance_syncing">동기화</string>
@ -45,7 +45,7 @@
<string name="translated_send_fromtransparent">투명한 지갑에서</string>
<string name="translated_send_fromboth">두 지갑에서</string>
<string name="translated_label_to"></string>
<string name="translated_feedback_default">유효한 zcash 주소를 입력하십시오</string>
<string name="translated_feedback_default">유효한 HUSH 주소를 입력하십시오</string>
<string name="translated_feedback_shieldedaddress">유효한 쉴드된 주소입니다.</string>
<string name="translated_feedback_transparentaddress">유효한 투명 주소입니다.</string>
<string name="translated_feedback_sameaddress">경고, 이것은 귀하의 주소 인 것 같습니다!</string>
@ -58,8 +58,8 @@
<string name="translated_send_unknown">알 수 없는</string>
<string name="translated_send_scanqr">수신자 주소 스캔</string>
<string name="translated_send_securityauth">보내기 인증</string>
<string name="translated_send_securityauth2">XX ZEC를 보낼 것인지 확인하십시오.</string>
<string name="translated_send_sending">XX ZEC를 보내기</string>
<string name="translated_send_securityauth2">XX HUSH 보낼 것인지 확인하십시오.</string>
<string name="translated_send_sending">XX HUSH 보내기</string>
<string name="translated_send_cancelled">취소되었습니다</string>
<string name="translated_send_sent">보냈습니다!</string>
<string name="translated_button_done"></string>

12
app/src/main/res/values-ru/translated.xml

@ -1,5 +1,5 @@
<resources>
<string name="translated_app_name">Кошелек ECC</string>
<string name="translated_app_name">SilentDragon</string>
<string name="translated_loadingtext">Загрузка</string>
<string name="translated_welcometext">Добро пожаловать!</string>
<string name="translated_fiattext">В валюте</string>
@ -11,7 +11,7 @@
<string name="translated_seed_restore">Восстановление из резервной копии</string>
<string name="translated_seed_restoretext">Вам необходимо будет ввести 24 слова фразы восстановления по порядку.</string>
<string name="translated_seed_reminder">Существует риск потерять средства!</string>
<string name="translated_seed_remindertext">Помните, что с Zcash Вы сами находитесь в роли банка. Любой, кто владеет фразой восстановления, получает полный доступ к кошельку.</string>
<string name="translated_seed_remindertext">Помните, что с HUSH Вы сами находитесь в роли банка. Любой, кто владеет фразой восстановления, получает полный доступ к кошельку.</string>
<string name="translated_seed_remindertext2">Вам следует незамедлительно создать резервную копию, так она позволит восстановить доступ к Вашему кошельку.</string>
<string name="translated_seed_accepted">Фраза восстановления принята, идёт сканирование блокчейна!</string>
<string name="translated_seed_birthdaytext">Мы сканируем блокчейн на предмет транзакций, которые относятся к вашему кошельку. Если вы можете указать дату создания данного кошелька, процесс ускорится.</string>
@ -22,7 +22,7 @@
<string name="translated_button_skip">Пропустить</string>
<string name="translated_balance_screen">Экран баланса</string>
<string name="translated_balance_amounttosend">Введите сумму для отправки</string>
<string name="translated_balance_expecting">Ожидание XX ZEC</string>
<string name="translated_balance_expecting">Ожидание XX HUSH</string>
<string name="translated_balance_available">Доступно</string>
<string name="translated_balance_nofunds">Нет доступных средств</string>
<string name="translated_balance_syncing">Синхронизация ... %</string>
@ -45,7 +45,7 @@
<string name="translated_send_fromtransparent">с Вашего прозрачного кошелька</string>
<string name="translated_send_fromboth">с двух кошельков</string>
<string name="translated_label_to">на</string>
<string name="translated_feedback_default">Введите действующий Zcash-адрес </string>
<string name="translated_feedback_default">Введите действующий HUSH-адрес </string>
<string name="translated_feedback_shieldedaddress">Это действующий защищённый адрес</string>
<string name="translated_feedback_transparentaddress">Это действующий прозрачный адрес</string>
<string name="translated_feedback_sameaddress">Внимание, похоже, это ваш адрес!</string>
@ -58,8 +58,8 @@
<string name="translated_send_unknown">Неизвестно</string>
<string name="translated_send_scanqr">Сканировать адрес получателя</string>
<string name="translated_send_securityauth">Подтвердите, чтобы отправить</string>
<string name="translated_send_securityauth2">Пожалуйста подтвердите, что хотите отправить XX ZEC на адрес</string>
<string name="translated_send_sending">Отправка XX ZEC на</string>
<string name="translated_send_securityauth2">Пожалуйста подтвердите, что хотите отправить XX HUSH на адрес</string>
<string name="translated_send_sending">Отправка XX HUSH на</string>
<string name="translated_send_cancelled">Отменено</string>
<string name="translated_send_sent">Отправлено!</string>
<string name="translated_button_done">Готово</string>

14
app/src/main/res/values-zh/translated.xml

@ -1,7 +1,7 @@
<resources>
<string name="translated_app_name">ECC 钱包</string>
<string name="translated_app_name">SilentDragon</string>
<string name="translated_loadingtext">准备工作</string>
<string name="translated_welcometext">欢迎使用 ECC 钱包!</string>
<string name="translated_welcometext">欢迎使用 HUSH 钱包!</string>
<string name="translated_fiattext">法币</string>
<string name="translated_title_backupseed">您的备份种子(助记词)</string>
<string name="translated_copy_backupseed">我们建议您使用纸笔抄录备份种子,并锁到带密码的保险箱里。</string>
@ -11,7 +11,7 @@
<string name="translated_seed_restore">从备份助记词中恢复钱包</string>
<string name="translated_seed_restoretext">您需要按照顺序输入 24 个助记词。</string>
<string name="translated_seed_reminder">您的资金处在安全风险中!</string>
<string name="translated_seed_remindertext">请记住,使用 Zcash 的时候,没有其他人在托管您的资金,您 是自己的银行。使用资金的唯一凭证就是助记词。如有他人知道了您的助记词,就有了转移您资金的所有权限。</string>
<string name="translated_seed_remindertext">请记住,使用 HUSH 的时候,没有其他人在托管您的资金,您 是自己的银行。使用资金的唯一凭证就是助记词。如有他人知道了您的助记词,就有了转移您资金的所有权限。</string>
<string name="translated_seed_remindertext2">请立即备份,如果您遗失了自己的备份,没有任何人能帮您恢复钱包、找回资金。</string>
<string name="translated_seed_accepted">已接受助记词,正在扫描您的帐户余额。</string>
<string name="translated_seed_birthdaytext">软件正在扫描区块链以发现与您的钱包有关的交易。如果您能提供这个钱包的创建时间,可以加快扫描速度。</string>
@ -22,7 +22,7 @@
<string name="translated_button_skip">跳过</string>
<string name="translated_balance_screen">余额扫描</string>
<string name="translated_balance_amounttosend">输入您想发送的数额</string>
<string name="translated_balance_expecting">预计为 XX ZEC</string>
<string name="translated_balance_expecting">预计为 XX HUSH</string>
<string name="translated_balance_available">可用</string>
<string name="translated_balance_nofunds">暂无可用的款项</string>
<string name="translated_balance_syncing">正在同步 ...%</string>
@ -45,7 +45,7 @@
<string name="translated_send_fromtransparent">从您的透明钱包发送</string>
<string name="translated_send_fromboth">同时从您的隐蔽钱包和透明钱包拼凑数额</string>
<string name="translated_label_to"></string>
<string name="translated_feedback_default">请输入一个有效的 Zcash 地址</string>
<string name="translated_feedback_default">请输入一个有效的 HUSH 地址</string>
<string name="translated_feedback_shieldedaddress">这是一个有效的隐蔽地址</string>
<string name="translated_feedback_transparentaddress">这是一个有效的透明地址</string>
<string name="translated_feedback_sameaddress">警告,该地址似乎是您自己的地址!</string>
@ -58,8 +58,8 @@
<string name="translated_send_unknown">未知</string>
<string name="translated_send_scanqr">扫描接收人地址</string>
<string name="translated_send_securityauth">授权发送</string>
<string name="translated_send_securityauth2">请确认,您现在要发送 XX ZEC 发送给 </string>
<string name="translated_send_sending">正在发送 XX ZEC</string>
<string name="translated_send_securityauth2">请确认,您现在要发送 XX HUSH 发送给 </string>
<string name="translated_send_sending">正在发送 XX HUSH</string>
<string name="translated_send_cancelled">已取消</string>
<string name="translated_send_sent">已发送!</string>
<string name="translated_button_done">完成</string>

12
app/src/main/res/values/translated.xml

@ -11,7 +11,7 @@
<string name="translated_seed_restore">Restoring from a Backup</string>
<string name="translated_seed_restoretext">You will need to enter all 24 seed words in order.</string>
<string name="translated_seed_reminder">Your funds are at risk!</string>
<string name="translated_seed_remindertext">Remember, with Zcash YOU are the bank. Anyone with your seed phrase has access to your wallet.</string>
<string name="translated_seed_remindertext">Remember, with HUSH you are the bank. Anyone with your seed phrase has access to your wallet.</string>
<string name="translated_seed_remindertext2">You should back this up immediately as no one else can restore it for you.</string>
<string name="translated_seed_accepted">Seed accepted, scanning!</string>
<string name="translated_seed_birthdaytext">We are scanning the blockchain for transactions pertaining to your wallet. If you can provide a birthday date for this wallet we can speed it up.</string>
@ -22,7 +22,7 @@
<string name="translated_button_skip">Skip for now</string>
<string name="translated_balance_screen">Balance Screen</string>
<string name="translated_balance_amounttosend">Enter an amount to send</string>
<string name="translated_balance_expecting">expecting XX ZEC</string>
<string name="translated_balance_expecting">expecting XX HUSH</string>
<string name="translated_balance_available">Available</string>
<string name="translated_balance_nofunds">No funds available</string>
<string name="translated_balance_syncing">Syncing … %</string>
@ -45,7 +45,7 @@
<string name="translated_send_fromtransparent">from your transparent wallet</string>
<string name="translated_send_fromboth">from both wallets</string>
<string name="translated_label_to">To</string>
<string name="translated_feedback_default">Enter a valid Zcash address</string>
<string name="translated_feedback_default">Enter a valid HUSH address</string>
<string name="translated_feedback_shieldedaddress">This is a valid shielded address</string>
<string name="translated_feedback_transparentaddress">This is a valid transparent address</string>
<string name="translated_feedback_sameaddress">Warning, this appears to be your address!</string>
@ -58,14 +58,16 @@
<string name="translated_send_unknown">Unknown</string>
<string name="translated_send_scanqr">Scan Recipient Address</string>
<string name="translated_send_securityauth">Authenticate to send</string>
<string name="translated_send_securityauth2">Please confirm you want to send XX ZEC to</string>
<string name="translated_send_sending">Sending XX ZEC to</string>
<string name="translated_send_securityauth2">Please confirm you want to send XX HUSH to</string>
<string name="translated_send_sending">Sending XX HUSH to</string>
<string name="translated_send_cancelled">Cancelled</string>
<string name="translated_send_sent">Sent!</string>
<string name="translated_button_done">Done</string>
<string name="translated_button_seedetails">See Details</string>
<string name="translated_button_back">Go Back</string>
<string name="translated_screen_wallethistory">Your Wallet History</string>
<string name="translated_server_note">NOTE: You must fully close and restart the app for a server change to take effect. Entering and updating a server here will cause that server to be set in encrypted preferences and used all the time, otherwise a random server is chosen by default on startup.</string>
<string name="translated_street_mode">Street Mode (Hides balance and wallet history for extra privacy)</string>
</resources>

10
buildSrc/src/main/java/cash/z/ecc/android/Dependencies.kt

@ -6,11 +6,11 @@ object Deps {
const val kotlinVersion = "1.7.20"
const val navigationVersion = "2.5.2"
const val compileSdkVersion = 33
const val compileSdkVersion = 31
const val minSdkVersion = 21
const val targetSdkVersion = 33
const val versionName = "1.0.0"
const val versionCode = 1_00_00 // last digits are alpha(0XX) beta(2XX) rc(4XX) release(8XX). Ex: 1_08_04_401 is an release candidate build of version 1.8.4 and 1_08_04_800 would be the final release.
const val targetSdkVersion = 30
const val versionName = "1.0.4"
const val versionCode = 1_04_00 // last digits are alpha(0XX) beta(2XX) rc(4XX) release(8XX). Ex: 1_08_04_401 is an release candidate build of version 1.8.4 and 1_08_04_800 would be the final release.
const val packageName = "hush.android"
@ -78,7 +78,7 @@ object Deps {
./gradlew build
./gradlew build publishToMavenLocal
*/
const val SDK = "cash.z.ecc.android:zcash-android-sdk:1.9.0-beta01-SNAPSHOT"
const val SDK = "hush.android:hush-android-sdk:1.9.0-beta01-SNAPSHOT"
}
object Misc {
const val LOTTIE = "com.airbnb.android:lottie:3.7.0"

Loading…
Cancel
Save