message: add 10s timeout to ninja.getAccount
diff: @@ -64,7 +64,10 @@ export class NinjaService {
  // false - does not exist, null - any other error
  async getAccount(account: string): Promise<any> {
  - return await this.http.get(this.ninjaUrl + 'accounts/' + account).toPromise()
  + const REQUEST_TIMEOUT_MS = 10000;
  +
  + const successPromise =
  + this.http.get(this.ninjaUrl + 'accounts/' + account).toPromise()
  .then(res => {
  return res;
  })
  @@ -75,6 +78,21 @@ export class NinjaService {
  return null;
  });
  +
  + const timeoutPromise =
  + new Promise(resolve => {
  + setTimeout(
  + () => {
  + resolve(null);
  + },
  + REQUEST_TIMEOUT_MS
  + );
  + });
  +
  + return await Promise.race([
  + successPromise,
  + timeoutPromise
  + ]);
  }
  }
  