diff --git a/src/client/src/views/tools/messages/SignMessage.tsx b/src/client/src/views/tools/messages/SignMessage.tsx index 7761a244e..0e18afff9 100644 --- a/src/client/src/views/tools/messages/SignMessage.tsx +++ b/src/client/src/views/tools/messages/SignMessage.tsx @@ -20,6 +20,26 @@ export const SignMessage = () => { } }, [loading, data]); + const copySignature = async () => { + try { + if (navigator.clipboard && window.isSecureContext) { + await navigator.clipboard.writeText(signed); + } else { + const textArea = document.createElement('textarea'); + textArea.value = signed; + textArea.style.position = 'fixed'; + textArea.style.opacity = '0'; + document.body.appendChild(textArea); + textArea.select(); + document.execCommand('copy'); + document.body.removeChild(textArea); + } + toast.success('Signature Copied'); + } catch { + toast.error('Failed to copy signature'); + } + }; + return (
Signature