feat: add UI funding source retries (#3407)

This commit is contained in:
Tiago Vasconcelos 2025-10-16 23:12:22 +01:00 committed by GitHub
parent 1e0dab32c3
commit d0cf374cda
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 3 deletions

View file

@ -106,6 +106,28 @@
:form-data="formData"
:allowed-funding-sources="settings.lnbits_allowed_funding_sources"
/>
<div class="row q-col-gutter-md q-my-md">
<div class="col-12 col-sm-8">
<q-item tag="div">
<q-item-section>
<q-item-label
v-text="$t('funding_source_retries')"
></q-item-label>
<q-item-label
caption
v-text="$t('funding_source_retries_desc')"
></q-item-label>
</q-item-section>
<q-item-section>
<q-input
filled
v-model="formData.funding_source_max_retries"
type="number"
/>
</q-item-section>
</q-item>
</div>
</div>
</div>
<q-separator></q-separator>
<h6 class="q-mt-lg q-mb-sm">

View file

@ -664,10 +664,10 @@ class FundingSourcesSettings(
# How long to wait for the payment to be confirmed before returning a pending status
# It will not fail the payment, it will make it return pending after the timeout
lnbits_funding_source_pay_invoice_wait_seconds: int = Field(default=5, ge=0)
funding_source_max_retries: int = Field(default=4, ge=0)
class FiatProvidersSettings(StripeFiatProvider):
def is_fiat_provider_enabled(self, provider: str | None) -> bool:
"""
Checks if a specific fiat provider is enabled.

File diff suppressed because one or more lines are too long

View file

@ -667,5 +667,8 @@ window.localisation.en = {
connected: 'Connected',
not_connected: 'Not Connected',
free: 'Free',
paid: 'Paid'
paid: 'Paid',
funding_source_retries: 'Max Retries',
funding_source_retries_desc:
'Maximum number of retries for funding sources, before it falls back to VoidWallet.'
}