@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
7 lines • 334 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.return_code))
throw new Error(`${r.return_code} - ${r.error_message}`);
};
//# sourceMappingURL=common.js.map