@salla.sa/twilight-components 2.13.28 → 2.13.29

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -25481,15 +25481,13 @@ const SallaQuickBuy = class {
25481
25481
  salla.lang.onLoaded(() => {
25482
25482
  this.quickBuy = salla.lang.get('pages.products.buy_now');
25483
25483
  });
25484
- if (salla.config.isGuest()) {
25485
- let eventName = "salla-quick-buy::user.logged-in";
25486
- salla.api.auth.setAfterLoginEvent(eventName);
25487
- salla.event.on(eventName, () => this.settlePayment());
25488
- }
25489
25484
  }
25490
25485
  async quickBuyHandler() {
25491
25486
  if (salla.config.isGuest()) {
25492
25487
  // todo (low) :: find a way to re-fire the method after success
25488
+ let afterLoginEvent = "salla-quick-buy::user.logged-in";
25489
+ salla.event.on(afterLoginEvent, () => this.settlePayment());
25490
+ salla.api.auth.setAfterLoginEvent(afterLoginEvent);
25493
25491
  return salla.auth.event.dispatch('login::open', { withoutReload: true });
25494
25492
  }
25495
25493
  await this.settlePayment();