Skip to content
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

DashPay: Send payment | Contact UI #464

Merged
merged 56 commits into from
Aug 4, 2020

Conversation

HashEngineering
Copy link
Collaborator

@HashEngineering HashEngineering commented Jul 28, 2020

Issue being fixed or feature implemented

NMA-372

Add ability to send payments to a contact.

Known Issues:

  1. For the DashPayUserActivity, the notifications currently use a duplicate TransactionViewHolder class (in Kotlin). This can be refactored in a different story along with other view holders to separate files and possibly also replace the Java version
  2. When starting the flow from the Select a Contact Screen, the flow ends at that screen after closing the DashPayUserActivity at the end of the process, instead of the Payments Screen. I am not sure how to return to the previous screen from there.
  3. When paying a contact, the same address may be used. This is not ideal, a new address should be used. This would be fixed in the dashpay library. This has been addressed in dashj.

Related PR's and Dependencies

dashpay/android-dashpay#18
dashpay/dashj#82

Screenshots / Videos

Screenshot_20200724-115411_Dash  palinka
Screenshot_20200724-115429_Dash  palinka
Screenshot_20200724-115417_Dash  palinka

How Has This Been Tested?

  • QA (Mobile Team)

Checklist:

  • I have performed a self-review of my own code and added comments where necessary
  • I have added or updated relevant unit/integration/functional/e2e tests

* New classes NotificationsLiveData, NotificationCountLiveData
* Listeners react to updating the contact database and then update data
* The notifications screen is live
* Remove timer code from BlockchainServiceImpl
…into dpp-0.13

# Conflicts:
#	wallet/src/de/schildbach/wallet/ui/HeaderBalanceFragment.java
#	wallet/src/de/schildbach/wallet/ui/dashpay/CreateIdentityService.kt
#	wallet/src/de/schildbach/wallet/ui/dashpay/DashPayViewModel.kt
#	wallet/src/de/schildbach/wallet/ui/dashpay/NotificationsActivity.kt
#	wallet/src/de/schildbach/wallet/ui/dashpay/PlatformRepo.kt
Fix other bugs with EnterAmountFragment and ConfirmTransactionDialog
Submit new bloom filters when contact is added
…o dashpay-send-payment

# Conflicts:
#	wallet/src/de/schildbach/wallet/ui/dashpay/DashPayViewModel.kt
#	wallet/src/de/schildbach/wallet/ui/dashpay/PlatformRepo.kt
Copy link
Collaborator

@tomasz-ludek tomasz-ludek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good stuff!

Comment on lines -98 to -100
if(initialize) {
walletApplication.saveWalletAndFinalizeInitialization()
}
Copy link
Collaborator

@tomasz-ludek tomasz-ludek Aug 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was moved out of the background thread therefore we should retest all the wallet initialization scenarios.
2e3d14e#diff-05204d8915f357bdf7c4bfcbed61d7c3R79

Comment on lines +110 to +117
blockchainIdentityDataDaoAsync.load()?.let {
blockchainIdentity = initBlockchainIdentity(it, walletApplication.wallet)
while (isActive) {
log.info("Timer: Update contacts")
platformRepoInstance.updateContactRequests()
delay(UPDATE_TIMER_DELAY)
}
}
Copy link
Collaborator

@tomasz-ludek tomasz-ludek Aug 4, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will load the blockchainIdentity and start periodic contacts sync without the need of using Handler.
GlobalScope is active as long as the app is launched.

Periodic contacts sync will not start if there is no blockchainIdentity yet.

@@ -317,6 +317,8 @@ class CreateIdentityService : LifecycleService() {
platformRepo.updateCreationState(blockchainIdentityData, CreationState.DONE)
}

PlatformRepo.getInstance().init()
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will also start the periodic contacts sync

tomasz-ludek and others added 3 commits August 4, 2020 16:46
…romProtobuf() method so that it is triggered for a regular app launches. During the wallet restoration it will be triggered after restoring the identity.
…dWalletFromProtobuf() method so that it is triggered for a regular app launches. During the wallet restoration it will be triggered after restoring the identity."

This reverts commit 9fa9947
@HashEngineering
Copy link
Collaborator Author

This will be merged after the next round of QA testing.

@HashEngineering HashEngineering merged commit 437e12c into evonet-develop Aug 4, 2020
@tomasz-ludek tomasz-ludek deleted the dashpay-send-payment branch August 14, 2020 08:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants