Fix closing payment popup
This commit is contained in:
parent
11fbc0fe07
commit
4daa3dd321
4
.env
4
.env
@ -1,5 +1,5 @@
|
||||
API_ID=1025907
|
||||
API_HASH=452b0359b988148995f22ff0f4229750
|
||||
VERSION=1.5.0
|
||||
VERSION_FULL=1.5.0 (198)
|
||||
BUILD=198
|
||||
VERSION_FULL=1.5.0 (199)
|
||||
BUILD=199
|
||||
|
@ -761,6 +761,13 @@ export default class PopupPayment extends PopupElement {
|
||||
onConfirmed();
|
||||
} else {
|
||||
popupPaymentVerification = new PopupPaymentVerification(paymentResult.url);
|
||||
popupPaymentVerification.addEventListener('finish', () => {
|
||||
popupPaymentVerification = undefined;
|
||||
|
||||
// setTimeout(() => {
|
||||
onConfirmed();
|
||||
// }, 0);
|
||||
});
|
||||
await new Promise<void>((resolve, reject) => {
|
||||
popupPaymentVerification.addEventListener('close', () => {
|
||||
popupPaymentVerification = undefined;
|
||||
@ -773,11 +780,6 @@ export default class PopupPayment extends PopupElement {
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
popupPaymentVerification.addEventListener('finish', () => {
|
||||
popupPaymentVerification = undefined;
|
||||
onConfirmed();
|
||||
});
|
||||
}
|
||||
} catch(err) {
|
||||
if((err as ApiError).type === 'BOT_PRECHECKOUT_TIMEOUT') {
|
||||
|
Loading…
x
Reference in New Issue
Block a user