Commit Graph

51 Commits

Author SHA1 Message Date
Honza Rychnovský e92c0b613c
[#1359] Remove fixed US locale
* [#1359]: Use default Locale in PercentDecimal

* Intended use of Local.US

* Use default Locale in Transaction history dates

* Use default Locale in Balance widget

* Use default Locale in Send tests

* Use default Locale in WalletDisplayValues.kt
2024-04-18 13:05:32 +02:00
Honza Rychnovský afd47e513e
[#1352] Remove test fixture values ZIP321
- Addresses issue J from the security audit: Payment URI parser uses a test fixture address
- This also removes unused Request screen with its logic and tests
- Closes #1352
2024-04-18 08:10:08 +02:00
Honza Rychnovský 3845772071
[#1159] Send.Confirmation according to new design
- Closes #1159
- Closes #1269
- Closes #1073
- Its direct follow-ups are #1294 and #1161
- Other follow up is #1260
- These changes also enable having two Primary buttons side-by-side
- This adds sorting history of transactions by a new calculated height after send done
- This also changes how we treat empty transaction dates from `-` to `` in UI
- Changelog update
2024-03-21 09:57:36 +01:00
Honza Rychnovský fe5236fdae
[#1285] Adopt proposal API
* Adopt Zcash SDK v2.0.8-SNAPSHOT

* [#1285] Adopt proposal API

- Closes #1285
- Manually tested and the updated send and shield features work as expected
2024-03-15 10:05:40 +01:00
Honza Rychnovský d076605444
[#1162] Partial transaction history item rework
- Zcash Android SDK v2.0.7 partially adopted. Proper implementaiton will be part of the Send screens rework.
- Partially addresses #1162. More related UI changes on the transaciton history item come in a follow-up PR
- `HistoryItem` composable will be reworked to several more composables as well
- Also note that the history item amount still lacks proper formatting as filed in #1047
- Closes #1236
- Closes #1288
- Closes #1253
2024-03-13 09:56:49 +01:00
Honza Rychnovský cc5f3504fe
[#1235] Server switching
- Closes #1235
- Note that failures and server saving success are reported to the UI with the Android system Snackbar or via the existing Textfield’s error bottom text until we define popup design as filed in #1242
- Changelog update
2024-03-04 16:53:30 +01:00
Honza Rychnovský 7e27bdddff
[#1195] Integrate Current Balances widget to Send
- Closes #1195
- The fixture recipient address type changed from the unified to the sapling on several tests to avoid temporary address TODO text obtained from the SDK fixture
- WalletDisplayValues have the updateAvailable optional with false as a default value
- Changelog updated
2024-01-26 12:44:46 +01:00
Honza Rychnovský 155b171b46
[#1156] Common current balance state UI component
* [#1156] Common current balance state UI component

- Closes #1156
- Created a reusable current balances widget UI component for the Account and Balances screen
- Incorporated into the Account screen
- Improved ZcashCurrency API with localized currency identificators

* Changelog update

* File follow-up on testing
2024-01-23 09:59:33 +01:00
Honza Rychnovský d1eec2dae8
[#1153] Adopt SDK v2.0.4
* [#1153] Adopt SDK v2.0.4
- Closes #1153
- Add TODO inline
- Changelog update
2024-01-09 12:27:32 +01:00
Honza Rychnovský c901a63d54
[#1139] Malformed pattern for ICU DecimalFormat
- This handles possible malformed format pattern exceptions in Zashi, but the proper solution needs to be provided within the SDK. See  #1315.
- Closes #1139
2023-12-21 17:40:59 +01:00
Honza Rychnovský a3e7d8f6c4
[#1108] Ktlint 1.0.1
* [#1108] Ktlint 1.0.1

- Closes #1108
- Version and artefact update

* Fix ktlint warnings
2023-12-11 10:20:32 +01:00
Honza Rychnovský cf45a0ef34
[#942] New Wallet Recovery Phrase Screen
[#942] New Wallet Recovery Phrase Screen

[#1006] Enhance VersionInfo with other fields

[#947] About screen UI + logic + tests

[#1040] Extract logo and title on top of screens

- Place it into a separate UI component
- Used across several screens
- Closes #1040

Remove long version of the Backup screen

- We previously had a configuration field that controlled which version of the screen should be displayed to a user
- Removed
- Partly solves #1003

Backup screen view redesign

Tests + docummentation

Update links to the Zashi Github repository

As the GitHub repository was recently moved from Zcash under the ECC company

[#1014] Unify screen name with Figma design

[#1045] Adopt Zcash SDK v2.0.3

Closes #1045

Fix screenshot test

The new wallet recovery screen is now much taller; scrolling to the acting button is needed.

Fix Restore screen test

Lint tools warnings
2023-11-23 10:00:13 +01:00
Honza Rychnovský 8aaa5367d8
[#974] Post SbS adoption UI changes
* [#974] Post SbS adoption UI changes

Closes #974

* [#974] Add decimals to percentage
2023-10-04 14:04:08 +02:00
Honza Rychnovský 3b1d42528d
[#972] Adopt PersistableWallet API changes in SDK
* [#944] Adopt SDK version with SbS included

- This supposes to fail in the build until the proper SDK version is consumed
- Tested via included builds

* Switch to latest v2.0.0-rc.2

* Adopt latest SDK snapshot version

* [#972] Adopt PersistableWallet API changes in SDK

Closes  #972.

* Adopt SDK supporting PersistableWallet.endpoint
2023-09-28 12:05:36 +02:00
Honza Rychnovský 9ec0de1729
[#944] Adopt SDK version 2.0.0 with SbS included
* [#944] Adopt SDK version with SbS included

- This supposes to fail in the build until the proper SDK version is consumed
- Tested via included builds

* Adopt latest SDK changes

* Adopt changed TransactionOverview API

* Switch to latest v2.0.0-rc.2

* Fix transaction history test fixture

* Adopt latest SDK snapshot version

* Switch to latest production Zcash SDK version
2023-09-27 08:52:31 +02:00
Honza Rychnovský 72564db24a
[#891] ZEC/TAZ currency distinction 2023-06-27 13:54:51 +02:00
Carter Jernigan b6226c55eb
[#853] Adopt latest SDK changes
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-05-12 07:14:31 -04:00
Honza Rychnovsky 543d5f2b59
[#792] Add Sending Screens
* [#804][Design system] Paddings - Dimens

- Initial commit to ensure it meets our requirements
- This solution is now in parallel with a simpler existing Paddings solution
- Four spacing groups defined
- Provides a way to define default and custom spacing values
- Distinguished by screen size, but other metrics also available (e.g. orientation, aspect ratio, layout direction or screen shape)

* Fix spacing value

* Move spacings change logic to comment

- We've decided to have only one regular spacing group for now, which is suitable for most of current phone devices

* Move Dimens out of internal package

* Link TODO for later Paddings remove

* Link issue of Use Dimens across the app to TODO

* [#792] Add sending screens

- This extends the Send screen logic with several subscreens
- A transaction submission connected to the Synchronizer
- Some logic moved to Android specific class
- System back navigation handler implemented
- Styling with dimes introduced to all Send screens
- New UI, Android specific, integration and screenshot tests added
- Additionally we could consider implementing a proper SendState mechanism, as we do in e.g. BackupState

* File issue of problematic pseudolocales texts inserted in Send.Form screen

* Add scrolling to send view

* Switch SendViewIntegrationTest away from TestSetup

* Provide MockSynchronizer to integration test

---------

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-03-27 08:25:36 +02:00
Carter Jernigan 84b40fc5fa
[#151] Add birthday to restore 2023-03-21 15:04:16 -04:00
Carter Jernigan f5e0af6545
[#757] Adopt SDK 1.14.0 (#759) 2023-02-17 06:05:23 -05:00
Alex 7523619afa
[#673] process .ec files from emulator.wtf
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-02-13 08:10:32 -05:00
Alex b84df3d9dc
[#592] Instrumentation coverage
Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2023-01-17 14:54:40 -05:00
Carter Jernigan 4f144405c1
[#708] Fix seed byte generation 2023-01-17 11:44:57 -05:00
Alex 88c7277048
[#161] Implement display of new address types
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2023-01-09 07:57:22 -05:00
Honza Rychnovsky e71c7854a9
[#642] Adopt SDK 1.10.0 API changes
* Adopt SDK 1.10.0 API changes

* Rename ShieldedSapling -> LegacySapling

* Viewing key re-derived for fix fixture value

* Changes used API for retrieving Transparent address

- Switched API DerivationTool.deriveTransparentAddress() -> Synchronizer.getLegacyTransparentAddress()
- Renamed Transparent -> LegacyTransparent

* Adds new common transaction model class

- Synchronizer.toTransactions() now works only with clearedTransactions and pendingTransactions
-Added CommonTransaction wrapper for all attributes of PendingTransaction and TransactionOverview to cover as much as possible. It's prepared for discussion about which attributes we really need and which we can omit.

* Regeneration of addresses in fixture

- Applies for both Transparent and Sapling addresses
- Fixed related test
- Added a new test for checking Transparent address abbreviation, as it also serves as a little check of the fixture address and can prevent an incorrect address change in the future

* Remove Viewing key usage from entire app

- As we agreed that the app should not access to it now
- Removed from all related places

* Change CommonTransaction to sealed class

* Comments update

* Switch SDK to 1.10.0-beta01-SNAPSHOT version

* Revert back legacy naming on Transparent and Sapling addresses

* Increased timeout limit to satisfy SDK initialization

* Remove unused import
2022-11-25 09:30:27 +01:00
Carter Jernigan 45d90b7706 [#586] AGP 7.3 2022-09-22 16:06:09 -04:00
Carter Jernigan a48b18e1be
[#556] Adopt SDK 1.9 ZcashNetwork API 2022-08-04 11:56:50 -04:00
Carter Jernigan f9afd2e5f9
[#536] Adopt BlockHeight API (#537)
Note that this change modifies the on-disk representation of the wallet.  Anyone who has an earlier build install will see a runtime crash.  This is expected, as we are not supporting data migrations at this stage of development.  The solution is to uninstall/reinstall the app.
2022-07-26 10:46:23 -04:00
Honza Rychnovsky 32c20953f7
[#310] [Scaffold] Progress Status Circular Bar
* [#310] [Scaffold] Progress Status Circular Bar

- Added Z to Home ZECs balance
- Added USD balance text to Home
- Prepared Text extension functions for both
- Provided Zatoshi to USD conversion methods + filed related SDK conversion issue

* Update Home screen UI with progress bars

- Implemented scaffolding UI of progress bars
- Added related texts to strings

* Update Home screen UI with progress bars

- Connected some of the implemented UI elements to SDK values
- Added app update information to Home screen
- Update WalletSnapshot with progress field

* Update Home screen UI with progress bars

- Capturing and handling errors from SDK Synchronizer.
- Added related error strings.
-  Simplified Home screen UI.

* Zboto font added. Load it in runtime. Import to Typography.

* Updated ZEC sign icon.

* Draw ZEC balance with Zboto font

* Simplify Home screen balances assigning

* Switch to PercentDecimal progress representatiton

* Support different locales while working with fiat currency

* Fix bug in checking of fiat currency value

* Generalize strings to provide possibility of other fiat currencies

* Add fiat currency conversion states mechanism

* Add TODO comment with reference to follow up SynchronizerError issue

* Add WalletDisplayValues to simplify HomeView composable

* Add CurrencyConversion class for connection to Price API (and convert Zatoshi to fiat currency)

* Add basic HomeView tests

* Add basic HomeViewIntegration test

* Review changes

- Used Duration API for times
 - Allow injecting clock into currency conversion
 - Moved FiatCurrencyConversionRateState to sdk-ext-ui because I suspect that we’ll consider this to be a UI object.  I based this on the fact that current/stale cutoff values are arbitrary and probably should be the domain of the UI rather than the SDK.
 - Added some tests, although additional coverage is needed
 - Added fixtures for model objects

* Minor code refactoring

- Move UpdateInfoFixture class to fixture dir
- Remove unnecessary annotation
- Add common application context method to test suite
- Fix Test class import
- Move several WalletSnapshotFixture parameters to const fields

* Add WalletDisplayValuesTest to cover the model class.

* Fix import after changes merged

* Use the new MonetarySeparatorsFixture in related tests

* Add a few basic Zatoshi -> USD conversion tests

* Turn on core lib desugaring for sdk-ext-ui-lib module

* Make WalletDisplayValues a data class

I think there may be some instances where this can help with recomposition

* Add preference key for fiat currency

This allows us to configure reading the value with observers correctly, even if we don’t allow the user to change it right now.

* Delegate symbol and formatting to JVM

* Add tests for Locale

Co-authored-by: Carter Jernigan <git@carterjernigan.com>
2022-07-13 09:16:05 +02:00
Carter Jernigan 0ffaab953b
[#510] Consume Zatoshi from SDK (#514)
Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-06-23 07:31:16 -04:00
Carter Jernigan 45aff80e76
[#511] Ktlint 0.46.1 2022-06-22 05:48:19 -04:00
Carter Jernigan 6540cd6bd3 [#482] Rename build-convention to build-conventions-secant
This prevents naming conflicts with included builds across multiple projects with build conventions.
2022-06-14 18:20:51 -04:00
Honza Rychnovsky 0023eb287a
[#430] Crash Intel 64-bit Emulators
* [#430] App crashes on Intel x86_64 emulators

- Bump the SDK version to the latest snapshot version.
- Set app's max Android SDK version to 31 for wtf emulators.
- Remove overridden wtf emulators config from sdk-ext-lib module.
2022-06-07 07:24:45 +02:00
Carter Jernigan 9267e75cb8
[#303] Write crash logs on external storage (#429)
- Added automatic exception logging, registered in the Application object
 - The design sends the exception to a second process, as the main process could be in a bad state when crashing. If we ever encounter problems with this design, it is easily toggleable to turn off with a boolean resource
 - Reading the process name is a bit complex on older Android versions, so we leverage a ContentProvider (which runs prior to Application.onCreate()) to get the process name
 - Added a simple logging mechanism for multiprocess and multithread log messages
 - Refactored spackle-lib into spackle-lib (multiplatform) and spackle-android-lib

Co-authored-by: Honza <rychnovsky.honza@gmail.com>
2022-05-31 12:38:02 -04:00
Carter Jernigan a8be47bf89
[#433] Use emulator.wtf for tests on CI (#428)
This should speed up our builds and reduce flakiness.

Followup items:
 - Enable coverage
 - Collect screenshots
 - Fix target API on sdk-ext-lib #430
2022-05-17 10:06:56 -04:00
Carter Jernigan 4f960d5bf8
[#6] Refactor kotlinOptions to build-conventions 2022-05-17 06:06:44 -04:00
Carter Jernigan 3e67fda537
[#394] Kotlin 1.6.20
Also updated the Compose compiler to be compatible
2022-04-22 10:57:56 -04:00
Honza Rychnovsky 4e5e5c4ab7
[#223] fromZecString reject bad input.
- Implementing regex solution for validation of input ZecAmount after confirm button is pressed.
- Added also unit tests for this new feature.
- Move necessary components from sdk-ext-lib to sdk-ext-ui module.
- Align implementation with comments form PR.
- Fix name of run configuration.
- Ensure consistent behavior of tests.
2022-04-08 14:33:08 +02:00
Honza Rychnovsky db13435d52
[#218] Prevent illegal number on ZEC amount
- Prevent illegal input in ZEC Send/Request form.
- New SDL-EXT-UI module for UI related SDK helper components.
- Regex for continuous validation of the entered ZEC amount.
- Added a new unit tests for validation of the regex too.
- Using the regex on ZEC Request and ZEC Send screens.
- Updated existing and created a new UI tests for validating entered ZEC amount values on Request and Send screens.
- Improve code to be validated with DetektAll static analyzation.
- Architecture documentation update with the newly added sdk-ext-ui module.
- Added run configuration sdk-ext-lib:connectedCheck for AS.
- Added check for digits count between grouping separators + tests.
- Refactoring test class name and its separator value.
2022-04-01 16:28:16 +02:00
Honza Rychnovsky 39949d8632
[#283] Kotlin API for Zcash URI parser
- Includes Zip321UriBuildFixture for the toUri() method from the Rust layer.
- Includes Zip321UriParseFixture for the fromUri() method from the Rust layer.
- Added ZecRequestTest class for testing ZecRequest methods.
- Align Zip321UriBuildFixture and Zip321UriParseFixture parameters.
- Added comments to the new() methods of Zip321BuildFixture and Zip321ParseFixture.
2022-03-30 14:16:57 +02:00
Carter Jernigan 45e14e6a4b [#173] Adopt SDK API changes
This allows the app to consume the snapshot version of the SDK, which contains a number of API changes.

A followup issue of #279 was filed so that the app can be reverted to the release version of the SDK once the SDK API stabilizes again.
2022-03-16 13:00:13 -04:00
Carter Jernigan 3d4f9fb4b4
[#142] Send ZEC scaffold (#253)
Implements a basic scaffold for sending ZEC.

Some new model objects and an extension method were added that I hope to move to the SDK.

Followup issues include
 - Press-and-hold for the Send button #249
 - Prevent illegal input in input form #218
 - Prevent undefined behavior if locale changes #217
 - Add error handling to the Zec send screen #250
 - Add confirmation after send is created #252
2022-03-01 08:11:23 -05:00
Carter Jernigan a1199e706e
[#135] Request ZEC scaffold 2022-02-17 08:08:06 -05:00
Carter Jernigan 52588e6bd3
[#191] Background sync
Preliminary and limited version of background sync, with the following limitations
 - Sync is always enabled
 - Default sync period is 24 hours and is not updated once the wallet is created

This change refactors the synchronizer to a global singleton that both WorkManager and the UI can interact with.
2022-02-04 07:37:08 -05:00
Carter Jernigan d46cf8187c
[#145] Profile scaffold 2022-01-13 12:49:08 -05:00
Carter Jernigan eb550f680e [#166] Included build for SDK development
Note that the SDK master branch contains breaking API changes, which the Secant app hasn't yet been updated to support, so enabling an included build will have compile failures.
2022-01-04 16:20:37 -05:00
Carter Jernigan ee96e915ae
[#62] Wallet details scaffold
Implements a details screen showing various wallet addresses

Some known issues requiring followup in future pull requests:
 - #159 Colors for light theme have not been defined yet
 - #160 Color blocks have 2x borders along the top/bottom of the middle item
 - #161 Some address types display placeholder values
2021-12-31 08:28:16 -05:00
Carter Jernigan 205344c201
[#12] Home screen scaffold (#158)
This provides a very basic scaffold of the home screen and navigation to other child screens.  Additional work needs to be done in both the SDK and this app to build all of the functionality.  Specific known gaps
 - Displaying synchronization status to the user, pending full designs on the progress and animation behaviors
 - Improved APIs for listing and filtering transactions.  This is the issue in the SDK https://github.com/zcash/zcash-android-wallet-sdk/issues/242
 - Implement the UI for displaying transaction history
 - Display fiat currency values
 - Hook up buttons to navigate to other screens (scan #137, profile #145, send #134, request #135)
2021-12-29 14:38:14 -05:00
Carter Jernigan 2e40af9390 [#17] Import wallet 2021-12-17 10:35:22 -05:00
Carter Jernigan 9db77e2afe
[#16] Skeleton for wallet creation
In addition to the UI, this implements improved state management for the WalletViewModel which emits a sealed class now.

Work remaining for followup PRs:
- Use drag-and-drop for chips instead of dropdown menus #85
- Add red background color for test fail screen #86 
- Add images for various screens (depends on #66 #64)
- Implement copy to clipboard #49
2021-11-17 15:19:49 -05:00