Fix crypto payment warning
This commit is contained in:
@@ -209,6 +209,7 @@ const format_country = (c: typeof countries.all[0]) => {
|
||||
{:else}
|
||||
<CreditDepositNav bind:country={country} bind:provider={provider} bind:vat={vat}/>
|
||||
|
||||
{#if provider.crypto === true}
|
||||
<p style="text-align: initial;" class="highlight_blue">
|
||||
When paying with cryptocurrencies it is important that you pay the
|
||||
<b>exact amount</b> stated on the order. If you pay too little, the
|
||||
@@ -217,6 +218,7 @@ const format_country = (c: typeof countries.all[0]) => {
|
||||
from an online exchange, sometimes they will subtract the fees from
|
||||
the amount sent which will cause the payment to fail.
|
||||
</p>
|
||||
{/if}
|
||||
|
||||
<form class="amount_grid" on:submit|preventDefault={checkout}>
|
||||
<div class="span3">Please choose an amount</div>
|
||||
|
@@ -40,7 +40,7 @@ const checkout = async (network = "", amount = 0, country = "") => {
|
||||
}
|
||||
|
||||
let invoices = []
|
||||
let unpaid_invoice = false
|
||||
let unpaid_invoice = 0
|
||||
const load_invoices = async () => {
|
||||
loading = true
|
||||
try {
|
||||
@@ -50,12 +50,12 @@ const load_invoices = async () => {
|
||||
}
|
||||
|
||||
let invoices_tmp = await resp.json()
|
||||
unpaid_invoice = false
|
||||
unpaid_invoice = 0
|
||||
invoices_tmp.forEach(row => {
|
||||
row.time = new Date(row.time)
|
||||
|
||||
if (row.status === "open") {
|
||||
unpaid_invoice = true
|
||||
unpaid_invoice++
|
||||
}
|
||||
})
|
||||
invoices_tmp.sort((a, b) => {
|
||||
@@ -88,7 +88,7 @@ onMount(() => {
|
||||
amount={window.user.balance_micro_eur}/>
|
||||
</p>
|
||||
|
||||
{#if unpaid_invoice}
|
||||
{#if unpaid_invoice > 1}
|
||||
<div class="highlight_yellow">
|
||||
<p>
|
||||
You still have an unpaid invoice open. Please pay that one
|
||||
|
Reference in New Issue
Block a user