UNPKG

@sangaman/xud

Version:
29 lines 1.1 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); const errorCodesPrefix_1 = __importDefault(require("../constants/errorCodesPrefix")); const codesPrefix = errorCodesPrefix_1.default.ORDERBOOK; const errorCodes = { INVALID_PAIR_ID: codesPrefix.concat('.1'), DUPLICATE_ORDER: codesPrefix.concat('.2'), ORDER_NOT_FOUND: codesPrefix.concat('.3'), }; exports.errorCodes = errorCodes; const errors = { INVALID_PAIR_ID: (pairId) => ({ message: `invalid pairId: ${pairId}`, code: errorCodes.INVALID_PAIR_ID, }), DUPLICATE_ORDER: (localId) => ({ message: `order with localId ${localId} already exists`, code: errorCodes.DUPLICATE_ORDER, }), ORDER_NOT_FOUND: (orderId) => ({ message: `order with id ${orderId} could not be found`, code: errorCodes.ORDER_NOT_FOUND, }), }; exports.default = errors; //# sourceMappingURL=errors.js.map