@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
18 lines • 563 B
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.getLoadingStatus = void 0;
const type_1 = require("../../deposit/type");
const getLoadingStatus = ({ isLoading, isSuccess, error, }) => {
if (isLoading) {
return type_1.LoadingStatus.Pending;
}
if (error) {
return type_1.LoadingStatus.Error;
}
if (isSuccess) {
return type_1.LoadingStatus.Success;
}
return type_1.LoadingStatus.Idle;
};
exports.getLoadingStatus = getLoadingStatus;
//# sourceMappingURL=getLoadingStatus.js.map