-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Keystone integration #1692
Keystone integration #1692
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@Milan-Cerovsky please, we need to fix the broken tests first.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few comments inline. Please create separate strings folders and move related texts into them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we use vector instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it does not export well into a vector :(
Column { | ||
Text( | ||
modifier = Modifier.padding(horizontal = 24.dp), | ||
text = "Wallets & Hardware", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move all texts into the related strings.xml
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
isLoading = isLoading, | ||
addWalletButton = | ||
ButtonState( | ||
text = stringRes("Add hardware wallet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same comment here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This button will be removed with upcoming PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded texts here, too.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
) { | ||
Image( | ||
bitmap = it, | ||
contentDescription = "", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we use null instead of empty string for content descriptions that we want to omit from talkback?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
made it to null
}.stateIn(viewModelScope, SharingStarted.WhileSubscribed(ANDROID_STATE_FLOW_TIMEOUT), null) | ||
|
||
@Suppress("MaxLineLength", "MagicNumber") | ||
private fun genSolanaQRCode(): UREncoder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's move this sample code to a fixture instead of the production part so we can easily replace it later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is refactored in the next coming PR
var failureText: String? = null | ||
|
||
if (validationResult == ScanValidationState.INVALID) { | ||
failureText = "This QR code is not a valid Keystone wallet." |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
Text( | ||
modifier = Modifier.fillMaxWidth(), | ||
textAlign = TextAlign.Center, | ||
text = "Scan your Keystone wallet to connect", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hardcoded text
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
if (null == collectedCameraProvider) { | ||
// Show loading indicator | ||
} else { | ||
val contentDescription = stringResource(id = R.string.scan_preview_content_description) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's add e.g. scan_keystone
resource folder and separate these strings into it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
✅
* Keystone integration (#1692) * Keystone QR generation and reader * Keystone account list UI * Top app bar refactor * Code cleanup * Design update * Keystone version bump * Code cleanup * Test hotfixes * Code cleanup * Keystone business logic implementation & ui elaboration (#1708) * Keystone business logic implementation & ui elaboration * Code cleanup * Code cleanup * Strings code cleanup * Navigation refactor * Navigation update * Select keystone account button hotfix * Navigation hotfix * Wallet restoration hotfixes and optimizations * Confirmation refactor * Design updates * Strings update and design updates * Zip321 keystone integration * Strings update * Spanish translations * New SDK changes integration * New SDK version adoption * Code cleanup * Code cleanup * Transaction history preparation * Sapling address made optional * Code cleanup * Design updates * Transaction hotfix * PCZT preparation * Settings design update * Strings update * Code cleanup * PCZT integration * Design updates * Code cleanup * App hotfixes * Strings update * Strings update * Transparent transaction UI update * Keystone tutorial link commented out * Keystone exception handling * Scan keystone progress bar * Scan keystone performance update * Share PCZT debug button * Optimizations * Add `MockSynchornizer` functions * Try-catch address obtaining Even though this is not the proper way we want to implement it, it fixes #1658 as a temporary solution * Fix `ExchangeRateState` loading state * Peformance optimizations * Account data source exception handling * Spanish strings updated * Transaction progress texts updated * Copy PCZT proposal data * Dialog window dim fix * Proposal proof optimization * Proposal proof optimization * Transaction progress shielding texts update * Code cleanup * Code cleanup * Code cleanup * PCZT progress calculation update * KS promo * KS sign in progress update * KS QR progress update * Adopt `Synchronizer.Status.INITIALIZING` state * Design updates * Propagate exceptions * Updates * Code cleanup * Promo update * Scan fix * Code cleanup * Bump to Zcash SDK 2.2.7-SNAPSHOT * Fix lint warnings * Make tests update With follow-up #1713 for fixing the failing tests. --------- Co-authored-by: Honza <[email protected]> --------- Co-authored-by: Honza <[email protected]>
Author
Reviewer
Footnotes
Code often looks different when reviewing the diff in a browser, making it easier to spot potential bugs. ↩
While we aim for automated testing of the application, some aspects require manual testing. If you had to manually test something during development of this pull request, write those steps down. ↩
While we are not looking for perfect coverage, the tool can point out potential cases that have been missed. Code coverage can be generated with:
./gradlew check
for Kotlin modules and./gradlew connectedCheck -PIS_ANDROID_INSTRUMENTATION_TEST_COVERAGE_ENABLED=true
for Android modules. ↩Having your code up to date and squashed will make it easier for others to review. Use best judgement when squashing commits, as some changes (such as refactoring) might be easier to review as a separate commit. ↩
In addition to a first pass using the code review guidelines, do a second pass using your best judgement and experience which may identify additional questions or comments. Research shows that code review is most effective when done in multiple passes, where reviewers look for different things through each pass. ↩
While the CI server runs the app to look for build failures or crashes, humans running the app are more likely to notice unexpected log messages, UI inconsistencies, or bad output data. Perform this step last, after verifying the code changes are safe to run locally. ↩