UNPKG

@blockbolt/monad-wallet

Version:
22 lines 945 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.validatePaymentDetails = void 0; const errors_1 = require("./errors"); const validatePaymentDetails = (details) => { if (!details.orderId || details.orderId.trim() === "") { throw new errors_1.BlockBoltSDKError("Order ID is required"); } if (!details.amount || isNaN(Number(details.amount)) || Number(details.amount) <= 0) { throw new errors_1.BlockBoltSDKError("Amount must be a positive number"); } if (!details.merchantName || details.merchantName.trim() === "") { throw new errors_1.BlockBoltSDKError("Merchant name is required"); } if (!details.merchantAddress || details.merchantAddress.trim() === "") { throw new errors_1.BlockBoltSDKError("Merchant address is required"); } }; exports.validatePaymentDetails = validatePaymentDetails; //# sourceMappingURL=validation.js.map