Last active
September 15, 2019 16:59
-
-
Save alexytiger/cca8285e59d5723573c7d42b0280860c to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| loadPurchaseContract$ = createEffect( | |
| () => | |
| this.actions$.pipe( | |
| ofType(PurchaseContractActions.loadPurchaseContract), | |
| map(action => action.address), | |
| switchMap(address => { | |
| return this.purchaseSrv.loadPurchaseContract(address).pipe( | |
| map(contract => | |
| PurchaseContractActions.loadPurchaseContractSuccess({ contract })), | |
| catchError((err: Error) => | |
| of(ErrorActions.errorMessage({ errorMsg: err.message }), SpinnerActions.hide()) | |
| )) | |
| }) | |
| )); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment