Skip to content

Instantly share code, notes, and snippets.

@alexytiger
Created March 6, 2019 01:50
Show Gist options
  • Save alexytiger/aad08125ee0a88e45b4b482c21ba7482 to your computer and use it in GitHub Desktop.
Save alexytiger/aad08125ee0a88e45b4b482c21ba7482 to your computer and use it in GitHub Desktop.
@Effect()
GetAttack$: Observable<Action> = this.actions$.pipe(
ofType(fromAction.ActionTypes.GET_ATTACK),
switchMap(() => this.ethSrv.getAttack().pipe(
map((name: string) => new fromAction.GetAttackSuccess(name)),
catchError(err => of(new fromAction.EthError(err)))
)),
);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment