UNPKG

@metamask/snaps-utils

Version:
20 lines 683 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.iconDimensions = void 0; const icon_1 = require("../../icon.cjs"); /** * Verify the icon is square. */ exports.iconDimensions = { severity: 'warning', semanticCheck(files, context) { if (!files.svgIcon) { return; } const dimensions = (0, icon_1.getSvgDimensions)(files.svgIcon.toString()); if (dimensions && dimensions?.height !== dimensions.width) { context.report('The icon in the Snap manifest is not square. It is recommended to use a square icon for the Snap.'); } }, }; //# sourceMappingURL=icon-dimensions.cjs.map