Class Calls
Chaining Calls
Each backend call is a javascript promise, so they can be chained to happen one after another instead of simultaneously.
In this case, the login call will resolve/reject first and then, if login is successful, the account update call will resolve.
The alternative async/await construction can be used as well:
Parallel Calls
When not chained, calls will happen concurrently.
This will likely fail as the second call will happen before the first call has had a chance to resolve. Use parallel calls when you need to fetch unrelated data: accounts, beneficiaries, cards, fx-rates, etc.