UNPKG

bitcore-wallet-service

Version:
31 lines 1.27 kB
"use strict"; var __importDefault = (this && this.__importDefault) || function (mod) { return (mod && mod.__esModule) ? mod : { "default": mod }; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.getIconHtml = void 0; const config_1 = __importDefault(require("../config")); const iconMap = { new_copayer: 'person-plus.png', new_incoming_tx: 'down-arrow-green.png', new_incoming_tx_testnet: 'down-arrow-green.png', new_outgoing_tx: 'up-arrow-gray.png', new_tx_proposal: 'writing-gray.png', new_zero_outgoing_tx: 'up-arrow-gray.png', tx_confirmation: 'green-check.png', tx_confirmation_receiver: 'green-check.png', tx_confirmation_sender: 'green-check.png', txp_finally_rejected: 'failed-icon.png', wallet_complete: 'green-check.png' }; const getIconHtml = (templateName, sendEmail) => { const iconFile = iconMap[templateName]; if (!iconFile) { return null; } const staticUrl = config_1.default.baseUrl || 'https://bws.bitpay.com'; const iconUrl = `${staticUrl}/bws/static/images/${iconFile}`; return `<img src="${iconUrl}" alt="${templateName} icon" style="width: 50px; height: 50px;" />`; }; exports.getIconHtml = getIconHtml; //# sourceMappingURL=iconsconfig.js.map