UNPKG

@ledgerhq/live-common

Version:
50 lines 1.14 kB
export function createWrongSwapParams(params) { return { code: "WRONG_SWAP_PARAMS", message: "swap params are not correctly set", data: { params, }, }; } export function createWrongSellParams(params) { return { code: "WRONG_SELL_PARAMS", message: "sell params are not correctly set", data: { params, }, }; } export function createWrongFundParams(params) { return { code: "WRONG_FUND_PARAMS", message: "fund params are not correctly set", data: { params, }, }; } export function createAccounIdNotFound(accountId) { return { code: "ACCOUNT_ID_NOT_FOUND", message: "unable to find account id in current wallet", data: { accountId, }, }; } export class ExchangeError { name = "ExchangeError"; get message() { return this.context.message; } get cause() { return this.context.code; } context; constructor(context) { this.context = context; } } //# sourceMappingURL=error.js.map