Skip to content

Commit

Permalink
Apollo: Release source code for 51.3
Browse files Browse the repository at this point in the history
  • Loading branch information
acrespo committed Nov 9, 2023
1 parent 65f61a5 commit 8fdf1b4
Show file tree
Hide file tree
Showing 8 changed files with 35 additions and 54 deletions.
7 changes: 6 additions & 1 deletion android/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ follow [https://changelog.md/](https://changelog.md/) guidelines.

## [Unreleased]

### FIXED
## [51.3] - 2023-11-09

### CHANGED

- Handling of High Fees situation. Improved copy for home and receive banners and
disable LN QRs of payments that will surely fail with a better message.

## [51.2] - 2023-10-24

Expand Down
4 changes: 2 additions & 2 deletions android/apolloui/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,8 @@ android {
applicationId "io.muun.apollo"
minSdkVersion 19
targetSdkVersion 33
versionCode 1102
versionName "51.2"
versionCode 1103
versionName "51.3"

// Needed to make sure these classes are available in the main DEX file for API 19
// See: https://spin.atomicobject.com/2018/07/16/support-kitkat-multidex/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ class LnInvoiceQrFragment : QrFragment<LnInvoiceQrPresenter>(), LnInvoiceView {
@BindView(R.id.high_fees_warning_overlay)
lateinit var highFeesOverlay: View

@BindView(R.id.high_fees_continue_button)
lateinit var highFeesContinueButton: View

// State:

// Part of our (ugly) hack to allow SATs as an input currency option
Expand All @@ -73,10 +70,6 @@ class LnInvoiceQrFragment : QrFragment<LnInvoiceQrPresenter>(), LnInvoiceView {
@JvmField
var highFees = false

@State
@JvmField
var hasDismissedHighFeesWarning = false // Flag to decide when to stop showing high fees warning

private var countdownTimer: MuunCountdownTimer? = null

override fun inject() {
Expand All @@ -90,7 +83,6 @@ class LnInvoiceQrFragment : QrFragment<LnInvoiceQrPresenter>(), LnInvoiceView {
super.initializeUi(view)
hiddenSection.setOnClickListener { presenter.toggleAdvancedSettings() }
createOtherInvoice.setOnClickListener { onCreateInvoiceClick() }
highFeesContinueButton.setOnClickListener { onHighFeesContinueButtonClick() }

if (OS.supportsNotificationRuntimePermission()) {
notificationsPrimingView.setUpForLightning()
Expand Down Expand Up @@ -254,11 +246,6 @@ class LnInvoiceQrFragment : QrFragment<LnInvoiceQrPresenter>(), LnInvoiceView {
invoiceSettingsContent.visibility = View.GONE
}

private fun onHighFeesContinueButtonClick() {
hasDismissedHighFeesWarning = true
refresh()
}

private fun showInvoiceExpiredOverlay() {
invoiceExpiredOverlay.visibility = View.VISIBLE
qrOverlay.visibility = View.GONE
Expand All @@ -273,7 +260,7 @@ class LnInvoiceQrFragment : QrFragment<LnInvoiceQrPresenter>(), LnInvoiceView {
}

override fun refresh() {
if (highFees && !hasDismissedHighFeesWarning) {
if (highFees) {
showHighFeesOverlay()

} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ class ShowUnifiedQrFragment : QrFragment<ShowUnifiedQrPresenter>(), ShowUnifiedQ
@BindView(R.id.high_fees_warning_overlay)
lateinit var highFeesOverlay: View

@BindView(R.id.high_fees_continue_button)
lateinit var highFeesContinueButton: View

// State:

// Part of our (ugly) hack to allow SATs as an input currency option
Expand All @@ -79,10 +76,6 @@ class ShowUnifiedQrFragment : QrFragment<ShowUnifiedQrPresenter>(), ShowUnifiedQ
@JvmField
var highFees = false

@State
@JvmField
var hasDismissedHighFeesWarning = false // Flag to decide when to stop showing high fees warning

private var countdownTimer: MuunCountdownTimer? = null

override fun inject() {
Expand All @@ -104,7 +97,6 @@ class ShowUnifiedQrFragment : QrFragment<ShowUnifiedQrPresenter>(), ShowUnifiedQ
addressTypeItem.setOnAddressTypeChangedListener(this)
hiddenSection.setOnClickListener { presenter.toggleAdvancedSettings() }
createOtherInvoice.setOnClickListener { onCreateInvoiceClick() }
highFeesContinueButton.setOnClickListener { onHighFeesContinueButtonClick() }

hiddenSection.setExpanded(false)

Expand Down Expand Up @@ -242,11 +234,6 @@ class ShowUnifiedQrFragment : QrFragment<ShowUnifiedQrPresenter>(), ShowUnifiedQ
uriSettingsContent.visibility = View.GONE
}

private fun onHighFeesContinueButtonClick() {
hasDismissedHighFeesWarning = true
refresh()
}

private fun showInvoiceExpiredOverlay() {
invoiceExpiredOverlay.visibility = View.VISIBLE
qrOverlay.visibility = View.GONE
Expand Down Expand Up @@ -304,7 +291,7 @@ class ShowUnifiedQrFragment : QrFragment<ShowUnifiedQrPresenter>(), ShowUnifiedQ
}

override fun refresh() {
if (highFees && !hasDismissedHighFeesWarning) {
if (highFees) {
showHighFeesOverlay()

} else {
Expand Down
7 changes: 0 additions & 7 deletions android/apolloui/src/main/res/layout/fragment_show_qr_ln.xml
Original file line number Diff line number Diff line change
Expand Up @@ -84,13 +84,6 @@
android:textSize="16sp"
android:gravity="center" />

<io.muun.apollo.presentation.ui.view.MuunButton
android:id="@+id/high_fees_continue_button"
style="@style/muun_button_primary"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/show_qr_high_fees_continue" />

</LinearLayout>

</RelativeLayout>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="@string/show_qr_high_fees_warning"
android:text="@string/show_qr_high_fees_warning_unified_qr"
android:textColor="@color/text_secondary_color"
android:layout_marginStart="60dp"
android:layout_marginEnd="60dp"
Expand All @@ -84,13 +84,6 @@
android:textSize="16sp"
android:gravity="center" />

<io.muun.apollo.presentation.ui.view.MuunButton
android:id="@+id/high_fees_continue_button"
style="@style/muun_button_primary"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="@string/show_qr_high_fees_continue" />

</LinearLayout>

</RelativeLayout>
Expand Down
17 changes: 12 additions & 5 deletions android/apolloui/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1152,11 +1152,18 @@
<string name="show_qr_invoice_create_other">Crear factura</string>

<string name="show_qr_high_fees_warning">
Recibir pagos en lightning está temporalmente deshabilitado mientras actualizamos nuestra
infraestructura de pagos.
Tu monedero está temporalmente inhabilitado para recibir pagos a través de Lightning debido
a la alta congestión de la Red de Bitcoin.
\n\n
Para recibir un pago, por favor cambia a la pestaña de Bitcoin.
</string>
<string name="show_qr_high_fees_warning_unified_qr">
Tu monedero está temporalmente inhabilitado para recibir pagos a través de Lightning debido
a la alta congestión de la Red de Bitcoin.
\n\n
Para recibir un pago, por favor visita Ajustes > Lightning Network y configura a Bitcoin
como tu protocolo para recibir.
</string>
<string name="show_qr_high_fees_continue">ENTENDIDO</string>


<string name="address_share_title">Enviar a...</string>
<string name="secure_storage_error">
Expand Down Expand Up @@ -1736,7 +1743,7 @@
</string>

<string name="home_high_fees_card_body">
La red de bitcoin está a máxima capacidad, haciendo altas las comisiones.
La red de Bitcoin está congestionada. Los pagos están más lentos y costosos.
</string>

<string name="high_fees_explanation_title">High mempool size impacts</string>
Expand Down
15 changes: 12 additions & 3 deletions android/apolloui/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -1113,9 +1113,18 @@
<string name="show_qr_invoice_create_other">Create invoice</string>

<string name="show_qr_high_fees_warning">
Receiving lightning payments is temporarily disabled while we upgrade our payment infrastructure.
Your wallet is temporarily unable to receive Lightning payments due to the high congestion
of the Bitcoin Network.
\n\n
To receive a payment, please switch to the Bitcoin tab.
</string>
<string name="show_qr_high_fees_warning_unified_qr">
Your wallet is temporarily unable to receive Lightning payments due to the high congestion
of the Bitcoin Network.
\n\n
To receive a payment, please visit Settings > Lightning Network and set Bitcoin as your
receiving protocol.
</string>
<string name="show_qr_high_fees_continue">UNDERSTOOD</string>

<string name="address_share_title">Send to...</string>

Expand Down Expand Up @@ -1679,7 +1688,7 @@
</string>

<string name="home_high_fees_card_body">
The bitcoin network is at top capacity, making fees high.
The Bitcoin Network is congested. Fees are high, and confirmation times are slow.
</string>

<string name="high_fees_explanation_title">High mempool size impacts</string>
Expand Down

0 comments on commit 8fdf1b4

Please sign in to comment.