diff --git a/build.gradle b/build.gradle index 670a20a8e3..b67bdf8368 100644 --- a/build.gradle +++ b/build.gradle @@ -4,7 +4,7 @@ buildscript { coroutinesVersion = '1.6.4' ok_http_version = '4.9.1' dashjVersion = '21.1.4' - dppVersion = "1.5.2" + dppVersion = "1.7.0-SNAPSHOT" hiltVersion = '2.51' hiltCompilerVersion = '1.2.0' hiltWorkVersion = '1.0.0' diff --git a/common/src/main/java/org/dash/wallet/common/transactions/TransactionUtils.kt b/common/src/main/java/org/dash/wallet/common/transactions/TransactionUtils.kt index 475a916780..3a2b91c716 100644 --- a/common/src/main/java/org/dash/wallet/common/transactions/TransactionUtils.kt +++ b/common/src/main/java/org/dash/wallet/common/transactions/TransactionUtils.kt @@ -21,6 +21,7 @@ import org.bitcoinj.core.Address import org.bitcoinj.core.Transaction import org.bitcoinj.core.TransactionBag import org.bitcoinj.script.ScriptException +import org.bitcoinj.script.ScriptPattern object TransactionUtils { fun getWalletAddressOfReceived(tx: Transaction, bag: TransactionBag): Address? { @@ -86,6 +87,22 @@ object TransactionUtils { return result } + fun getOpReturnsOfSent(tx: Transaction, bag: TransactionBag): List { + val result = mutableListOf() + + for (output in tx.outputs) { + try { + if (!output.isMine(bag) && ScriptPattern.isOpReturn(output.scriptPubKey)) { + result.add("OP RETURN") + } + } catch (x: ScriptException) { + // swallow + } + } + + return result + } + fun Transaction.isEntirelySelf(bag: TransactionBag): Boolean { for (input in inputs) { val connectedOutput = input.connectedOutput diff --git a/common/src/main/java/org/dash/wallet/common/ui/PaymentHeaderView.kt b/common/src/main/java/org/dash/wallet/common/ui/PaymentHeaderView.kt index 5b1db44488..97d71ab834 100644 --- a/common/src/main/java/org/dash/wallet/common/ui/PaymentHeaderView.kt +++ b/common/src/main/java/org/dash/wallet/common/ui/PaymentHeaderView.kt @@ -70,8 +70,8 @@ class PaymentHeaderView @JvmOverloads constructor( binding.paymentAddressViewBalanceTitle.text = title } - fun setProposition(title: String) { - binding.paymentAddressViewProposition.text = title + fun setPreposition(title: String) { + binding.paymentAddressViewPreposition.text = title } fun setSubtitle(title: String) { diff --git a/common/src/main/res/layout/payment_header_view.xml b/common/src/main/res/layout/payment_header_view.xml index c6edf6584d..9f688b5e28 100644 --- a/common/src/main/res/layout/payment_header_view.xml +++ b/common/src/main/res/layout/payment_header_view.xml @@ -23,7 +23,7 @@ tools:text="@string/to" /> Specify Amount Create Account Submit + Try Again Search diff --git a/features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashdirect/PurchaseGiftCardFragment.kt b/features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashdirect/PurchaseGiftCardFragment.kt index 5d4e23c6b4..69124208e0 100644 --- a/features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashdirect/PurchaseGiftCardFragment.kt +++ b/features/exploredash/src/main/java/org/dash/wallet/features/exploredash/ui/dashdirect/PurchaseGiftCardFragment.kt @@ -177,7 +177,7 @@ class PurchaseGiftCardFragment : Fragment(R.layout.fragment_purchase_gift_card) private fun setPaymentHeader() { binding.paymentHeaderView.setTitle(getString(R.string.explore_option_buy)) - binding.paymentHeaderView.setProposition(getString(R.string.purchase_gift_card_at)) + binding.paymentHeaderView.setPreposition(getString(R.string.purchase_gift_card_at)) binding.paymentHeaderView.setOnShowHideBalanceClicked { binding.paymentHeaderView.triggerRevealBalance() viewModel.balance.value?.let { balance -> diff --git a/features/exploredash/src/main/res/values/strings-explore-dash.xml b/features/exploredash/src/main/res/values/strings-explore-dash.xml index 2ddb2abfbb..eb0a4638e4 100644 --- a/features/exploredash/src/main/res/values/strings-explore-dash.xml +++ b/features/exploredash/src/main/res/values/strings-explore-dash.xml @@ -220,7 +220,6 @@ Something went wrong! Retry Gift card purchase failed - Try Again Cancel For some reason we were not able to buy a gift card. Please, try again. Accept DashDirect terms and conditions diff --git a/wallet/androidTest/de/schildbach/wallet/database/DatabaseMigrationTest.kt b/wallet/androidTest/de/schildbach/wallet/database/DatabaseMigrationTest.kt index cb081b2076..dde11f7bdc 100644 --- a/wallet/androidTest/de/schildbach/wallet/database/DatabaseMigrationTest.kt +++ b/wallet/androidTest/de/schildbach/wallet/database/DatabaseMigrationTest.kt @@ -54,14 +54,15 @@ open class DatabaseMigrationTest { "Pizza for Bob's party", "" ) - private val address = "yNo1YJcNBoveEHWB7eYmxFZBVEAYQo46Yb" - private val service = ServiceName.CrowdNode + private const val address = "yNo1YJcNBoveEHWB7eYmxFZBVEAYQo46Yb" + private const val service = ServiceName.CrowdNode } private val migrations = arrayOf( AppDatabaseMigrations.migration11To12, AppDatabaseMigrations.migration12To13, - AppDatabaseMigrations.migration13to14 + AppDatabaseMigrations.migration13to14, + AppDatabaseMigrations.migration14to15 ) @Rule diff --git a/wallet/res/drawable/ic_block_home_indicator.xml b/wallet/res/drawable/ic_block_home_indicator.xml new file mode 100644 index 0000000000..d4ac4f840a --- /dev/null +++ b/wallet/res/drawable/ic_block_home_indicator.xml @@ -0,0 +1,9 @@ + + + diff --git a/wallet/res/drawable/ic_credits.xml b/wallet/res/drawable/ic_credits.xml new file mode 100644 index 0000000000..2e6e38b605 --- /dev/null +++ b/wallet/res/drawable/ic_credits.xml @@ -0,0 +1,9 @@ + + + diff --git a/wallet/res/drawable/ic_info_circle_filled_gray.xml b/wallet/res/drawable/ic_info_circle_filled_gray.xml new file mode 100644 index 0000000000..5163ae7752 --- /dev/null +++ b/wallet/res/drawable/ic_info_circle_filled_gray.xml @@ -0,0 +1,9 @@ + + + diff --git a/wallet/res/drawable/ic_mail_icon.xml b/wallet/res/drawable/ic_mail_icon.xml new file mode 100644 index 0000000000..f5e53a292d --- /dev/null +++ b/wallet/res/drawable/ic_mail_icon.xml @@ -0,0 +1,9 @@ + + + diff --git a/wallet/res/drawable/ic_profile_icon.xml b/wallet/res/drawable/ic_profile_icon.xml new file mode 100644 index 0000000000..49534c20bc --- /dev/null +++ b/wallet/res/drawable/ic_profile_icon.xml @@ -0,0 +1,9 @@ + + + diff --git a/wallet/res/layout/dialog_confirm_topup.xml b/wallet/res/layout/dialog_confirm_topup.xml new file mode 100644 index 0000000000..bd4a9583ee --- /dev/null +++ b/wallet/res/layout/dialog_confirm_topup.xml @@ -0,0 +1,129 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + +