@@ -2947,10 +2947,9 @@ function cardsAdd() {
const kicKey = document.getElementById('cards-kic-key').value.trim();
const kidKey = document.getElementById('cards-kid-key').value.trim();
if (!name) { alert('Name is required'); return; }
- if (!iccid) { alert('ICCID is required'); return; }
if (!kic || !kid) { alert('KIc and KID are required'); return; }
if (!kicKey || !kidKey) { alert('KIc key and KID key are required'); return; }
- if (cards.some(c => c.iccid === iccid)) { alert('Card with this ICCID already exists'); return; }
+ if (iccid && cards.some(c => c.iccid === iccid)) { alert('Card with this ICCID already exists'); return; }
cards.push({
name: name,
iccid: iccid,
@@ -3034,8 +3033,8 @@ function cardsImport() {
if (!Array.isArray(imported)) throw new Error('Expected an array');
let added = 0;
for (const entry of imported) {
- if (!entry.name || !entry.iccid) continue;
- if (cards.some(c => c.iccid === entry.iccid)) continue;
+ if (!entry.name) continue;
+ if (entry.iccid && cards.some(c => c.iccid === entry.iccid)) continue;
cards.push({
name: entry.name,
iccid: entry.iccid,