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