UNPKG

@ledgerhq/live-common

Version:
13 lines 553 B
import { from, of, throwError } from "rxjs"; import { catchError, concatMap } from "rxjs/operators"; import appSupportsQuitApp from "../appSupportsQuitApp"; import quitApp from "./quitApp"; const attemptToQuitApp = (transport, appAndVersion) => appAndVersion && appSupportsQuitApp(appAndVersion) ? from(quitApp(transport)).pipe(concatMap(() => of({ type: "appQuitted", })), catchError(e => throwError(() => e))) : of({ type: "appDetected", }); export default attemptToQuitApp; //# sourceMappingURL=attemptToQuitApp.js.map