diff --git a/pkg/tui/model.go b/pkg/tui/model.go index e59d03c..9ffda67 100644 --- a/pkg/tui/model.go +++ b/pkg/tui/model.go @@ -946,7 +946,7 @@ func (m Model) collectCardCmd() tea.Cmd { } const ordersPollInterval = 10 * time.Second -const cardPollTimeout = 2 * time.Minute +const cardPollTimeout = 10 * time.Minute type OrdersPollTickMsg struct{} diff --git a/pkg/tui/payment_form.go b/pkg/tui/payment_form.go index 7cc2540..64f5a26 100644 --- a/pkg/tui/payment_form.go +++ b/pkg/tui/payment_form.go @@ -374,7 +374,10 @@ func (m Model) renderPaymentHttpsView() string { accentStyle := m.theme.TextHighlight() if m.payment.collectTimeOut { - return m.theme.TextError().Bold(true).Render("payment link timed out") + "\n\n" + baseStyle.Render("no card saved after 2 minutes.") + "\n" + baseStyle.Render("press ") + accentStyle.Render("esc") + baseStyle.Render(" to go back and try again") + minutes := int(cardPollTimeout / time.Minute) + return m.theme.TextError().Bold(true).Render("payment link timed out") + "\n\n" + + baseStyle.Render(fmt.Sprintf("no card saved after %d minutes.", minutes)) + "\n" + + baseStyle.Render("press ") + accentStyle.Render("esc") + baseStyle.Render(" to go back and try again") } if m.payment.collectURL == nil {