Default request QR code to BTS.

- In ReceiveTransactionFragment, default the QR code to BTS in case the user has no balances so that he can easily show that QR to others and ask for funds.
This commit is contained in:
Severiano Jaramillo 2019-09-03 16:25:08 -05:00
parent 48f6304fd3
commit b10d9e0196

View file

@ -115,6 +115,13 @@ class ReceiveTransactionFragment : ConnectedFragment() {
Observer<List<cy.agorise.bitsybitshareswallet.database.entities.Asset>> { assets ->
mAssets.clear()
mAssets.addAll(assets)
// Add BTS to always show a QR
if (mAssets.isEmpty())
mAssets.add(cy.agorise.bitsybitshareswallet.database.entities.Asset(
"1.3.0", "BTS", 5, "", "")
)
mAssets.sortWith(
Comparator { a, b -> a.toString().compareTo(b.toString(), true) }
)