cancel
Showing results for 
Search instead for 
Did you mean: 

Unable to procced from shipping address checkout flow version 3.0.1

0 Kudos

Hi all,

I am triggering the form submit method in the Spartacus method. Problem here is when I clear the cache and cookie in my browser. The very first time the second call happens first and the first call happens as second. even though I put async await in the dispatch event it does not help to resolve my problem.

The problem here is verify address does not return response because its return type void i want the response from this method does any one know how to change it as observable?

<code>verifyAddress(address: Address): void {
        if (this.actionAllowed()) {
          let userId;
          this.userIdService
            .getUserId()
            .subscribe((occUserId) => (userId = occUserId))
            .unsubscribe();
          if (userId) {
            this.checkoutStore.dispatch(
              new CheckoutActions.VerifyAddress({
                userId,
                address,
              })
            );
          }
        }
      }
0 Kudos

Here createAndSetAddress failed the very first time because it's called before verifying an address. Is there any other way to wait for one by one dispatch event? Or any other way to convert those methods to observable for the confirmation of one is executed within the subscribe call another method?

Accepted Solutions (0)

Answers (0)