Skip to content

Commit 0551216

Browse files
authored
Update Wallet.svelte
1 parent 4d152b1 commit 0551216

File tree

1 file changed

+21
-6
lines changed

1 file changed

+21
-6
lines changed

src/lib/Wallet.svelte

Lines changed: 21 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
//import { getTransactions } from '../service/blockchains/stellar';
1616
import { horizonEventSource } from '../service/blockchains/stellar';
1717
import { paymentsdones } from '../service/blockchains/stellar';
18-
import { paymentRealized,pagoProcess } from '../service/blockchains/stellar';
18+
import { paymentRealized } from '../service/blockchains/stellar';
1919
import { createEventDispatcher } from 'svelte';
2020
export let address: string;
2121
export let pasword: string;
@@ -201,11 +201,11 @@
201201
</Button>
202202
</ButtonGroup>
203203
<div class="payRealized ">
204+
205+
{#if paymentDone}
204206
{#if paymentRealized=="proceso"}
205207
<div class="loader"></div>
206208
{/if}
207-
{#if paymentDone}
208-
209209
{#if paymentRealized=="hecho"}
210210
<div
211211
class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative"
@@ -217,18 +217,33 @@
217217
>
218218
</div>
219219
{/if}
220-
{#if paymentRealized=="fallido"}
220+
{#if paymentRealized=="fallido" && (paymentDone.amount==undefined || paymentDone.amount<=0)}
221+
<div
222+
class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
223+
role="alert"
224+
>
225+
<strong class="font-bold">¡No se pueden enviar montos nulos o negativos!</strong>
226+
</div>
227+
{/if}
228+
{#if paymentRealized=="fallido" && (paymentDone.destination==undefined || paymentDone.destination.length!==56)}
229+
<div
230+
class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
231+
role="alert"
232+
>
233+
<strong class="font-bold">¡Cuenta de destino invalida!</strong>
234+
</div>
235+
{/if}
236+
{#if paymentRealized=="fallido" && (paymentDone.amount!==undefined && paymentDone.amount>0 ) && ( paymentDone.destination!==undefined && paymentDone.destination.length==56 )}
221237
<div
222238
class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
223239
role="alert"
224240
>
225241
<strong class="font-bold">Pago fallido!</strong>
226242
<span class="block sm:inline"
227-
>No se envió {paymentDone.amount} a {paymentDone.destination}</span
243+
>No se pudo enviar {paymentDone.amount} a {paymentDone.destination}</span
228244
>
229245
</div>
230246
{/if}
231-
232247
{/if}
233248
</div>
234249
</div>

0 commit comments

Comments
 (0)