|
15 | 15 | //import { getTransactions } from '../service/blockchains/stellar';
|
16 | 16 | import { horizonEventSource } from '../service/blockchains/stellar';
|
17 | 17 | import { paymentsdones } from '../service/blockchains/stellar';
|
18 |
| - import { paymentRealized,pagoProcess } from '../service/blockchains/stellar'; |
| 18 | + import { paymentRealized } from '../service/blockchains/stellar'; |
19 | 19 | import { createEventDispatcher } from 'svelte';
|
20 | 20 | export let address: string;
|
21 | 21 | export let pasword: string;
|
|
201 | 201 | </Button>
|
202 | 202 | </ButtonGroup>
|
203 | 203 | <div class="payRealized ">
|
| 204 | + |
| 205 | + {#if paymentDone} |
204 | 206 | {#if paymentRealized=="proceso"}
|
205 | 207 | <div class="loader"></div>
|
206 | 208 | {/if}
|
207 |
| - {#if paymentDone} |
208 |
| - |
209 | 209 | {#if paymentRealized=="hecho"}
|
210 | 210 | <div
|
211 | 211 | class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative"
|
|
217 | 217 | >
|
218 | 218 | </div>
|
219 | 219 | {/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 )} |
221 | 237 | <div
|
222 | 238 | class="bg-red-100 border border-red-400 text-red-700 px-4 py-3 rounded relative"
|
223 | 239 | role="alert"
|
224 | 240 | >
|
225 | 241 | <strong class="font-bold">Pago fallido!</strong>
|
226 | 242 | <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 |
228 | 244 | >
|
229 | 245 | </div>
|
230 | 246 | {/if}
|
231 |
| - |
232 | 247 | {/if}
|
233 | 248 | </div>
|
234 | 249 | </div>
|
|
0 commit comments