Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Add specific zero-amount-payment-request error message #364

Merged
merged 2 commits into from
Sep 26, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main/java/zapsolutions/zap/util/InvoiceUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,7 @@ private static void decodeLightningInvoice(Context ctx, OnReadInvoiceCompletedLi
listener.onError(ctx.getString(R.string.error_paymentRequestExpired), RefConstants.ERROR_DURATION_SHORT);
} else if (paymentRequest.getNumSatoshis() == 0) {
// Disable 0 sat invoices
listener.onError(ctx.getString(R.string.error_notAPaymentRequest), RefConstants.ERROR_DURATION_LONG);
listener.onError(ctx.getString(R.string.error_zeroAmountPaymentRequest), RefConstants.ERROR_DURATION_LONG);
} else {
listener.onValidLightningInvoice(paymentRequest, invoice);
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -270,7 +270,7 @@
<string name="error">Error</string>
<string name="error_blockExplorer_title">Block Explorer</string>
<string name="error_blockExplorer_message" comment="Parameters are: %1$s: Name of selected block explorer, %2$s: 'mainnet' or 'testnet'">"Your currently selected block explorer (%1$s) does not support %2$s. \nPlease go to settings and choose another block explorer to continue."</string>
<string name="error_notAPaymentRequest">Invalid payment information.\n\nPlease use a Bitcoin address or Lightning payment request to initiate a payment.</string>
<string name="error_zeroAmountPaymentRequest">This is a zero amount payment request. Zap does not support zero amount payment requests due to security concerns associated with them.</string>
<string name="error_paymentRequestExpired">This payment request expired.</string>
<string name="error_useTestnetRequest">You are connected to TESTNET. Please use TESTNET addresses or payment requests.</string>
<string name="error_useMainnetRequest">You are connected to MAINNET. Please use MAINNET addresses or payment requests.</string>
Expand Down