Remove redundant revoke button from wallet sidebar

This commit is contained in:
Dione
2026-06-10 12:03:15 +00:00
parent 6473d3cedf
commit d9e0c1b89c

View File

@ -384,14 +384,7 @@ window.WalletManager = WalletManager;
this._persist();
return { success: true };
}
revokeVerification(address, chain) {
const idx = this._wallets.findIndex(w => w.address === address && w.chain === chain);
if (idx === -1) return { success: false, error: 'Wallet not found' };
this._wallets.splice(idx, 1);
this._persist();
return { success: true };
}
};
};
}
})();
@ -598,10 +591,7 @@ function renderSidebar() {
const verifyBtn = isEVM && !isVerified
? '<button onclick="handleVerifyWallet(\'' + w.address + '\',\'' + w.chain + '\',\'' + nick + '\')" class="text-[10px] bg-[#FF7A00]/20 hover:bg-[#FF7A00]/40 text-[#FF7A00] font-bold px-2 py-0.5 rounded transition" title="Verify ownership via MetaMask">Verify</button>'
: '';
const revokeBtn = isVerified && isEVM
? '<button onclick="handleRevokeVerification(\'' + w.address + '\',\'' + w.chain + '\')" class="text-[10px] bg-red-500/20 hover:bg-red-500/40 text-red-400 font-bold px-2 py-0.5 rounded transition" title="Revoke verification">Revoke</button>'
: '';
html += '<div class="flex items-center justify-between bg-[#05070B] border border-[#1A1F2C]/40 rounded-lg px-3 py-2.5">' +
html += '<div class="flex items-center justify-between bg-[#05070B] border border-[#1A1F2C]/40 rounded-lg px-3 py-2.5">' +
'<div class="flex items-center gap-2.5 min-w-0 flex-1">' +
'<div onclick="openColorPicker(event, \'' + w.address + '\')" class="wallet-color-dot" style="--wallet-color:' + color + ';background:' + color + ';" title="Click to change color"></div>' +
'<div class="min-w-0 flex-1">' +
@ -610,7 +600,7 @@ function renderSidebar() {
'</div>' +
'</div>' +
'<div class="flex items-center gap-1 flex-shrink-0">' +
verifyBtn + revokeBtn + syncBadge +
verifyBtn + syncBadge +
'<button onclick="handleDeleteWallet(\'' + w.address + '\',\'' + w.chain + '\',' + i + ')" class="text-gray-600 hover:text-red-400 transition" title="Remove wallet">' +
'<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round">' +
'<polyline points="3 6 5 6 21 6"/><path d="M19 6v14a2 2 0 0 1-2 2H7a2 2 0 0 1-2-2V6"/><path d="M10 11v6"/><path d="M14 11v6"/><path d="M9 6V4a1 1 0 0 1 1-1h4a1 1 0 0 1 1 1v2"/>' +
@ -891,13 +881,6 @@ async function handleVerifyWallet(address, chain, nickname) {
renderAll();
}
function handleRevokeVerification(address, chain) {
wm.removeWallet(address, chain);
delete walletSyncState[address];
delete addressSnapshots[address];
renderAll();
}
/* ===================================================================
Delete Wallet
=================================================================== */