File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -62,14 +62,15 @@ export async function getBalance(
62
62
*/
63
63
64
64
export let paymentDone : PaymentDone
65
-
66
- export let paymentRealized :boolean
65
+ export let pagoProcess : boolean
66
+ export let paymentRealized :string
67
67
export async function createPayment (
68
68
monto : number ,
69
69
payer : User ,
70
70
beneficiary : string ,
71
71
assetCode : AssetCodes = AssetCodes . XLM ,
72
72
) {
73
+ paymentRealized = "proceso"
73
74
try {
74
75
let sourceKeys = await StellarSdk . Keypair . fromSecret ( payer . privKey ) ;
75
76
let sourceAcount = await server . loadAccount ( payer . pubKey ) ;
@@ -94,14 +95,16 @@ export async function createPayment(
94
95
pruebaArmada . sign ( sourceKeys ) ;
95
96
const pruebaTerminada = await server . submitTransaction ( pruebaArmada ) ;
96
97
console . log ( pruebaTerminada ) ;
97
- paymentRealized = true
98
+ paymentRealized = "hecho"
98
99
paymentDone = {
99
100
amount :monto ,
100
101
destination : beneficiary ,
101
102
} ;
103
+ pagoProcess = false
102
104
} catch ( err ) {
103
105
console . log ( 'No se pudo completar la transacción' ) ;
104
- paymentRealized = false
106
+ paymentRealized = "fallido"
107
+ pagoProcess = false
105
108
}
106
109
}
107
110
You can’t perform that action at this time.
0 commit comments