@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
7 lines • 329 B
JavaScript
export const isNoErrorReturnCode = (code) => code === 0x9000;
export const getPath = (path) => path && path.substr(0, 2) !== "m/" ? `m/${path}` : path;
export const isError = (r) => {
if (!isNoErrorReturnCode(r.returnCode))
throw new Error(`${r.returnCode} - ${r.errorMessage}`);
};
//# sourceMappingURL=common.js.map