@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.
@@ -25477,15 +25477,13 @@ const SallaQuickBuy = class {
25477
25477
  salla.lang.onLoaded(() => {
25478
25478
  this.quickBuy = salla.lang.get('pages.products.buy_now');
25479
25479
  });
25480
- if (salla.config.isGuest()) {
25481
- let eventName = "salla-quick-buy::user.logged-in";
25482
- salla.api.auth.setAfterLoginEvent(eventName);
25483
- salla.event.on(eventName, () => this.settlePayment());
25484
- }
25485
25480
  }
25486
25481
  async quickBuyHandler() {
25487
25482
  if (salla.config.isGuest()) {
25488
25483
  // todo (low) :: find a way to re-fire the method after success
25484
+ let afterLoginEvent = "salla-quick-buy::user.logged-in";
25485
+ salla.event.on(afterLoginEvent, () => this.settlePayment());
25486
+ salla.api.auth.setAfterLoginEvent(afterLoginEvent);
25489
25487
  return salla.auth.event.dispatch('login::open', { withoutReload: true });
25490
25488
  }
25491
25489
  await this.settlePayment();