Skip to content

Commit 61347c3

Browse files
authored
Update Wallet.svelte
1 parent 7a6f2f8 commit 61347c3

File tree

1 file changed

+74
-14
lines changed

1 file changed

+74
-14
lines changed

src/lib/Wallet.svelte

Lines changed: 74 additions & 14 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 } from '../service/blockchains/stellar';
18+
import { paymentRealized,pagoProcess } from '../service/blockchains/stellar';
1919
import { createEventDispatcher } from 'svelte';
2020
export let address: string;
2121
export let pasword: string;
@@ -123,19 +123,7 @@
123123
</Modal>
124124

125125
<div class="flex items-center flex-wrap gap-4">
126-
{#if paymentDone}
127-
{#if paymentRealized}
128-
<div
129-
class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative"
130-
role="alert"
131-
>
132-
<strong class="font-bold">Pago realizado!</strong>
133-
<span class="block sm:inline"
134-
>Se envió {paymentDone.amount} a {paymentDone.destination}</span
135-
>
136-
</div>
137-
{/if}
138-
{/if}
126+
139127
<h1 class="text-gray-800 text-3xl sixa-max">{saldoFormateado}</h1>
140128
<ButtonGroup>
141129
<Button
@@ -212,4 +200,76 @@
212200
</svg>
213201
</Button>
214202
</ButtonGroup>
203+
<div class="payRealized ">
204+
{#if paymentRealized=="proceso"}
205+
<div class="loader"></div>
206+
{/if}
207+
{#if paymentDone}
208+
209+
{#if paymentRealized=="hecho"}
210+
<div
211+
class="bg-green-100 border border-green-400 text-green-700 px-4 py-3 rounded relative"
212+
role="alert"
213+
>
214+
<strong class="font-bold">Pago realizado!</strong>
215+
<span class="block sm:inline"
216+
>Se envió {paymentDone.amount} a {paymentDone.destination}</span
217+
>
218+
</div>
219+
{/if}
220+
{#if paymentRealized=="fallido"}
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">Pago fallido!</strong>
226+
<span class="block sm:inline"
227+
>No se envió {paymentDone.amount} a {paymentDone.destination}</span
228+
>
229+
</div>
230+
{/if}
231+
232+
{/if}
233+
</div>
215234
</div>
235+
<style>
236+
.loader {
237+
width: 48px;
238+
height: 48px;
239+
border: 3px solid #FFF;
240+
border-radius: 50%;
241+
display: inline-block;
242+
position: relative;
243+
box-sizing: border-box;
244+
animation: rotation 1s linear infinite;
245+
}
246+
247+
.loader::after {
248+
content: '';
249+
box-sizing: border-box;
250+
position: absolute;
251+
left: 50%;
252+
top: 50%;
253+
transform: translate(-50%, -50%);
254+
width: 40px;
255+
height: 40px;
256+
border-radius: 50%;
257+
border: 3px solid;
258+
border-color: #FF3D00 transparent;
259+
}
260+
261+
@keyframes rotation {
262+
0% {
263+
transform: rotate(0deg);
264+
}
265+
100% {
266+
transform: rotate(360deg);
267+
}
268+
}
269+
.payRealized{
270+
width: 100%;
271+
display: flex;
272+
justify-content: center;
273+
align-items: center;
274+
}
275+
</style>

0 commit comments

Comments
 (0)