Repository navigation
[NMA-1223] Merge 7.4.7 to Dash Pay - #929
Conversation
* feat: draft of explore screen for wallet * feat: moving explore dash to a separate feature module * feat: explore module architecture * fix: adding strings * feat: explore dash screen UI * fix: [NMA-878] Explore for wallet with Merchants/ATM's
* feat: di and merchants repository * feat: setting up search results list * feat: search results ui * feat: ui for filters * fix: checkmark and collapse_button * NMA-806 (part 1)
* Update Shortcut Bar * Add explore Button
* feat: di and merchants repository * feat: setting up search results list * feat: search results ui * feat: ui for filters * fix: cleanup * fix: checkmark and collapse_button * fix: filters UI * feat: merchant table and simple sync * feat: sqlite search draft * feat: full-text search for merchants * feat: filtering by territory * feat: no results message when search results are empty * feat: db migrations test * fix: deselecting of philter options * fix: changed default filter option to Online * test: tests for ExploreViewModel * [NMA-806]
* feat: di and merchants repository * feat: setting up search results list * feat: search results ui * feat: ui for filters * fix: checkmark and collapse_button * fix: filters UI * feat: merchant table and simple sync * feat: sqlite search draft * feat: full-text search for merchants * feat: filtering by territory * feat: no results message when search results are empty * feat: db migrations test * fix: deselecting of philter options * fix: changed default filter option to Online * feat: tests for ExploreViewModel * fix: adding copyright and licenses * feat: bottom sheet behavior for search results * feat: merchant details ui * feat: navigation to payments screen on 'pay with dash' click * fix: ui fixes * fix: rounded corners in filter dialog * fix: divider line for appbar * fix: scrolling to top when changing filter option * fix: hiding keyboard on details transition * fix: showing first 3 addresses * fix: deeplinks and appbar divider bug * fix: cleanup * fix: unit test * fix: PropertyName getting ignored in release build * [NMA-807]
* Explore Dash data sync via WorkManager
* feat: atms firebase sync * feat: atm filters + pagination * fix: bumping db version * fix: synching small tables first * fix: sorting dao output by name * fix: synchronization * feat: atm details * fix: hiding sell button for buy only ATMs * fix: missing divider when sell button is collapsed * Replaced callback based approach with more object oriented one * fix: deep_link property * Fixed the issue with BaseDao.clear() method Co-authored-by: Tomasz Ludek <[email protected]> * [NMA-804, NMA-786]
- update build.gradle for wallet: add Secret Gradle Plugin - update build.gradle for feature: add google maps dependencies - update build.gradle for project and gradle-wrapper.properties: upgrade AGP and Gradle plugin to handle Secret Gradle Plugin - fix NPE crash on SendCoinsBaseViewModel.kt and PaymentsPayFragment.kt - Explore Flow: update SearchFragment.kt - display map with user location and atm merchants location - Explore Flow: UserLocationState.kt - set class to provide location update - show map in full size - remove zoom controls - resize bottom sheet height - handle markers using markerManager - update markers displayed on map after filtering results - set workflow to read the play service api key - create white circle merchant marker - ignore generated json schema migrations - fix merge conflicts with `explore_dash` remote branch * recreate encrypted file for local.properties * rename property key for google api key - update ExploreViewModelTest.kt - add mockito dependency to handle mocking of final classes - update merchant data path - set default view of map to 50 mile radius - update user marker position after manual dragging - update api key for google maps and provide new config file - refresh map after filtering merchants * limit the number of markers to be displayed on the map to 20 * remove zoom controls * add comment explaining the limitation of the feature
* chore: remove jcenter and bintray repos * chore: update flexbox to 3.0.0 * chore: update dotsindicator to 4.2 * chore: hide warnings on dashj-bls-android 0.17.5
* feat: atms firebase sync * feat: atm filters + pagination * chore: cleanup * fix: bumping db version * fix: synching small tables first * fix: sorting dao output by name * fix: cleanup * fix: cleanup * fix: synchronization * feat: atm details * fix: cleanup * fix: hiding sell button for buy only ATMs * fix: missing divider when sell button is collapsed * Replaced callback based approach with more object oriented one * fix: deep_link property * Fixed the issue with BaseDao.clear() method * feat: segmented picker draft * feat: search results UI and Up button * chore: refactoring map-related code into a separate class * fix: location request and showing/hiding map logic * feat: filter dialog * feat: filtering by screen bounds * fix: don't do search if zoom level is too low Co-authored-by: Tomasz Ludek <[email protected]>
* this prevents a build error with Gradle 6.7.1
| @@ -115,7 +113,7 @@ | |||
| SUPPORTS_PLATFORM = true; | |||
| SYNC_FLAGS.add(MasternodeSync.SYNC_FLAGS.SYNC_HEADERS_MN_LIST_FIRST); | |||
| SYNC_FLAGS.add(MasternodeSync.SYNC_FLAGS.SYNC_BLOCKS_AFTER_PREPROCESSING); | |||
| FAUCET_URL = "http://faucet.krupnik.networks.dash.org/"; | |||
| org.dash.wallet.common.Constants.FAUCET_URL = "http://faucet.krupnik.networks.dash.org/"; | |||
There was a problem hiding this comment.
This is a bit weird, but we need FAUCET_URL in another module.
I think the correct approach to consider for the future is using DI and having an interface with all necessary network-specific values, while the implementation will be provided depending on the build flavor.
| @@ -289,7 +289,9 @@ class CreateUsernameActivity : InteractionAwareActivity(), TextWatcher { | |||
| } | |||
| }) | |||
| showProcessingState() | |||
| startService(CreateIdentityService.createIntentFromInvite(this, username, invite)) | |||
| invite?.let { | |||
There was a problem hiding this comment.
Kotlin 1.5 requires stricter null-safety, invite doesn't fit into createIntentFromInvite since it's nullable.
| updateContactRelationUi() | ||
| val dashPayProfile = intent.getParcelableExtra(EXTRA_INIT_PROFILE_DATA) as DashPayProfile? | ||
|
|
||
| if (dashPayProfile != null){ |
There was a problem hiding this comment.
Kotlin 1.5 requires stricter null-safety
| viewModel.handleInvite(externalInvite) | ||
| val invite = externalInvite | ||
|
|
||
| if (invite != null) { |
There was a problem hiding this comment.
Kotlin 1.5 requires stricter null-safety
| } | ||
|
|
||
| binding.bottomNavigation.menu.findItem(itemId).isChecked = true |
There was a problem hiding this comment.
Instead of keeping the type of bottom navigation in the fragments themselves and having them worry about checking an appropriate bottom bar button, we can get the currently displayed fragment in the MainActivity and keep the isChecked assignment in here.
| } | ||
| binding.bottomNavigation.setOnNavigationItemSelectedListener { item -> | ||
| binding.bottomNavigation.setOnItemSelectedListener { item -> |
There was a problem hiding this comment.
setOnNavigationItemSelectedListener is deprecated
| navParentView.forceHideViewToHide = forceHideBottomNav | ||
| } else { | ||
| activity.bottom_navigation.visibility = if (forceHideBottomNav) View.VISIBLE else View.GONE | ||
| } |
There was a problem hiding this comment.
navigationItem.isChecked = true logic is moved to MainActivity, but this one is left here for now. But I think it would be better to move it in there as well and get rid of BottomNavFragment. This will allow using the fragments that now are derived from it freely in other places, as well as help with the transition to the navigation component.
| @@ -89,14 +89,15 @@ class CropImageActivity : LockScreenActivity() { | |||
| background.setImageDrawable(resource) | |||
| circle_crop.setImageDrawable(resource) | |||
| circle_crop.maxZoom = 5f | |||
| if (initZoomedRect != null) { | |||
|
|
|||
| initZoomedRect?.let { rect -> | |||
There was a problem hiding this comment.
kotlin 1.5 strick null-safety (initZoomedRect is lazy and so a simple null-check doesn't work).
| private val analytics: AnalyticsService | ||
| private val analytics: AnalyticsService by lazy { | ||
| walletApplication.analyticsService | ||
| } |
There was a problem hiding this comment.
This will avoid problems with Firebase Analytics initialization that we had in explore-dash
| slotsLeft-- | ||
| } else { | ||
| removeShortcut(btn) | ||
| } |
There was a problem hiding this comment.
After trying to sort out our rules for displaying shortcuts, I've realized that there are 2 problems:
- Visibility of shortcuts is handled with both
addViewandisVisible. This leads to confusion and having 2 different methodssetupandrefreshwhile there should be only 1. ShorcutsPanemixes together the logic for showing each button and the logic for small/big screens. This should be split up.
The change I've made:
- Having buttons added/removed only by
addShortcutandremoveShortcutmethods. There is no ambiguity as to how to show and hide those buttons anymore. - Having all buttons we want to ever display in the current app version in the
shortcutslist. This is the only place that dictates the order of buttons. - The
shouldAppearproperty in theShortcutButtonis the only thing that tells whether the conditions are satisfied for showing the button. refreshchecks the list of buttons, checks which buttons want to be displayed and takes maximum based on the screen size.
| if (!children.contains(shortcut)) { | ||
| val index = min(childCount, shortcuts.indexOf(shortcut)) |
There was a problem hiding this comment.
Moving index calculation into addShortcut allows the shortcuts list to be the only truth for the order of buttons.
| output-metadata.json | ||
| service.properties No newline at end of file | ||
| service.properties | ||
| wallet/schemas/*/*.json |
There was a problem hiding this comment.
It seems like this line keeps appearing in our .gitignore in various PR's - there is at least one test that uses these files.
There was a problem hiding this comment.
Looks like it's removed from .gitignore in the head of master. Let's leave until the next merge.
There was a problem hiding this comment.
That is fine with me.
| service.properties No newline at end of file | ||
| service.properties | ||
| wallet/schemas/*/*.json | ||
| wallet/assets/explore/*.bin No newline at end of file |
There was a problem hiding this comment.
Our Explore Dash system no longer uses any .bin files
| classpath 'com.google.firebase:firebase-crashlytics-gradle:2.5.1' // Crashlytics | ||
| classpath "com.google.dagger:hilt-android-gradle-plugin:$hiltVersion" | ||
| classpath "androidx.navigation:navigation-safe-args-gradle-plugin:$navigationVersion" | ||
| classpath "com.google.android.libraries.mapsplatform.secrets-gradle-plugin:secrets-gradle-plugin:1.3.0" |
There was a problem hiding this comment.
I wonder if there is something like this that could be used to project other secrets unrelated to map keys.
There was a problem hiding this comment.
It seems like this plugin actually can be used for any other secrets in the local.properties: https://github.com/google/secrets-gradle-plugin
I'm thinking if it's not better to get rid of the encrypted local.properties and store secrets in GitHub, and then simply echo them into the local.properties during build. This will allow to quickly add and update any single secret.
There was a problem hiding this comment.
Yes, I will make a Story for this.
…oled surface dash-sdk-android 0.1.0-v41int18 -> v41int19 (platform#4329 pooled funding on rust-dashcore 8f26456b: ALL_SPENDABLE account type through Rust/FFI/JNI/Kotlin, sendToAddresses/buildSignedPayment defaults flipped; carries #931 dedup, #915, #925 add_funding, #929 contact-account funding, #918 AddressState). CoreSendAllNative migrates off the v1 split surface (#4323 deprecated setFunding$sdk_release/buildSigned$sdk_release — the split is not concurrency-safe): the drain now runs new -> addOutput -> setSelectionStrategy(ALL) -> finalizeAtomic$sdk_release (atomic select+reserve+sign under the wallet-manager lock) -> ManagedCoreWallet .broadcastTransaction(FinalizedCoreTransaction). The user-facing send-all now drains the pooled ALL_SPENDABLE set (BIP44 + BIP32 + every DashPay receival account in ONE transaction); the CoinJoin drain stays pinned to the COIN_JOIN account — de-mixing remains a separate, explicit flow. Co-Authored-By: Claude Fable 5 <[email protected]>
We need to merge 7.4.7 (Explore Dash) into
dashpaybranch and resolve conflicts.Issue being fixed or feature implemented
A couple of things to note:
PaymentsFragmentwas derived fromBottomNavFragmentand assumed to be hosted inMainActivity, which created problems when I tried to put it into Explore navigation graph. I figured it's better if we refactor this to moveBottomNavFragmentrelated logic into one place in theMainActivityso that the information about the hosting activity doesn't leak into the fragments. Refactoring isn't complete here, but it is started.Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: