Repository navigation
[NMA-1111] (Coinbase UI) Payment method picker + Enter Amount - #848
Conversation
| return ExchangeRate(parcel) | ||
| } | ||
|
|
||
| data class ExchangeRate( |
There was a problem hiding this comment.
The old ExchangeRate class is renamed to ExchangeRateData and marked as deprecated since it's just a wrapper there is no need for it anymore.
| private fun init(attributeSet: AttributeSet, defStyleAttr: Int, defStyleRes: Int) { | ||
| context.withStyledAttributes(attributeSet, R.styleable.NumericKeyboardView, defStyleAttr, defStyleRes) { | ||
| isFunctionEnabled = getBoolean(R.styleable.NumericKeyboardView_nk_functionEnabled, isFunctionEnabled) | ||
| isDecSeparatorEnabled = getBoolean(R.styleable.NumericKeyboardView_nk_decSeparatorEnabled, isDecSeparatorEnabled) |
There was a problem hiding this comment.
I figured it might be convenient to set isFunctionEnabled and isDecSeparatorEnabled from the layout
| <selector xmlns:android="http://schemas.android.com/apk/res/android"> | ||
| <item android:color="@color/white" android:state_selected="true"/> | ||
| <item android:color="@color/steel_gray_250" android:state_selected="false"/> | ||
| </selector> No newline at end of file |
There was a problem hiding this comment.
This diff doesn't make sense, rounded_ripple_transparent was deleted since rounded_ripple_background can do the same thing.
| android:angle="0" | ||
| android:startColor="#FF3199DF" | ||
| android:endColor="#FF006CBD" /> | ||
| </shape> |
There was a problem hiding this comment.
vector gradient caused crash on API 23
| android:id="@+id/connected" | ||
| style="@style/Overline" | ||
| android:textSize="10sp" | ||
| android:textColor="@color/gray_900" |
There was a problem hiding this comment.
The style already has the correct settings for text size and color.
| </style> | ||
|
|
||
| <style name="TertiaryButtonTheme.Large.Red"> | ||
| <item name="titleTextColor">@color/red_300</item> |
There was a problem hiding this comment.
These changes might cause some merge conflicts with explore-dash. I'll resolve them after one of the branches is merged with the master.
| private val exchangeRatesProvider: ExchangeRatesProvider, | ||
| val config: Configuration | ||
| ) : AndroidViewModel(application) { | ||
| ) : ViewModel() { |
There was a problem hiding this comment.
We don't actually need a viewmodel with application. Context can be injected with Hilt if needed.
| } | ||
| } | ||
|
|
||
| override fun currencyCodes(): LiveData<List<String>> { |
There was a problem hiding this comment.
currencyCodes() method wasn't used. If needed, it's better to re-add as Flow<List<String>>
| dismissOffsetDialogs(supportFragmentManager) | ||
| } | ||
|
|
||
| private fun dismissOffsetDialogs(fragmentManager: FragmentManager) { |
There was a problem hiding this comment.
There is another problem with dismissing dialogs currently - if the user unlocked the app and then opened a dialog, activatingLockScreen can be triggered after initialization, which will lead to that dialog being dismissed immediately.
I have added an alternative method for the OffsetDialogFragment exclusively to avoid side effects, but we should consider dismissing all dialogs this way.
| output-metadata.json | ||
| service.properties No newline at end of file | ||
| service.properties | ||
| wallet/schemas/*/*.json No newline at end of file |
There was a problem hiding this comment.
So we don't need these files in our repo?
I thought these files were needed for backward compatibility with older database versions.
There was a problem hiding this comment.
These files are actually generated on build. We don't need to keep them, and in some other branches, they were already excluded in .gitignore.
Right now our database is actually performing a destructive migration on every database version increment. That means everything is erased and re-created again. For keeping data when updating the database version, we need to write migrations.
There was a problem hiding this comment.
Re-added since we still might need them for testing migrations.
HashEngineering
left a comment
There was a problem hiding this comment.
I have questions regarding the room schema .json files
HashEngineering
left a comment
There was a problem hiding this comment.
Approved since my concerns were addressed.
As a part of Coinbase integration, we need a way to pick a payment method out of all provided by Coinbase API and enter the amount to buy in Dash or a chosen fiat.
Issue being fixed or feature implemented
AmountViewandEnterAmountFragmentborrow from the oldEnterAmountFragmentin the wallet, but I've tried to simplify it since the old one has a lot of repeating code and nested checks that are unnecessary. It's likely that I've missed some things that were considered in the old implementation, in which case we have time to ride the new one out in Coinbase and other modules and fix the bugs if there are any.WalletDataProvidercould be provided and injected with Hilt for fetching the exchange rates, but at this point, I figured we might as well injectExchangeRatesRepositorydirectly. TheExchangeRatesRepositorydoesn't need to be moved to thecommonmodule, only an interface is needed and the implementation can be provided with Hilt out of thewallet.ExchangeRatedid need to be moved to thecommonhowever, at which point I decided to convert it to Kotlin for a better null-safety. The database schema wasn't changed, so this will not affect users in any way.Related PR's and Dependencies
Screenshots / Videos
How Has This Been Tested?
Checklist: