v1.34.0: leer QR con la cámara
Botón ⌗ QR junto a cada campo (direcciones, URI de pago, txid, xpub, PSBT, tx en crudo). Enseña lo leído y pide confirmar. Rechaza semillas y claves privadas sin mostrarlas. Foto de respaldo sin cámara en directo. Librería qr 0.7.2 (Paul Miller) en vendor/qr/, con su huella en SETUP. Pruebas en tests/test22.js. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01L5npnUYgSPkAaHkdaeUqBr
This commit is contained in:
@@ -59,6 +59,7 @@
|
||||
/>
|
||||
<div style={{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap",marginBottom:10}}>
|
||||
<button onClick={decode} style={{padding:"9px 16px",background:C.blueMuted,border:`1px solid ${C.blue}40`,borderRadius:6,color:C.blue,fontFamily:C.mono,fontSize:"0.72rem",cursor:"pointer",fontWeight:700}}>ANALIZAR</button>
|
||||
<BotonQR campo="psbt" color={C.blue} onLeido={v=>cambiarTexto(v)}/>
|
||||
<label style={{padding:"9px 16px",background:"none",border:`1px solid ${C.border}`,borderRadius:6,color:C.t2,fontFamily:C.mono,fontSize:"0.7rem",cursor:"pointer"}}>
|
||||
…o abrir archivo .psbt
|
||||
<input type="file" accept=".psbt,.txn,application/octet-stream" style={{display:"none"}} onChange={e=>{ setInput(""); cargarArchivo(e.target.files[0]); e.target.value=""; }}/>
|
||||
@@ -157,7 +158,10 @@
|
||||
style={{width:"100%",background:C.bg,border:`1px solid ${C.borderBright}`,borderRadius:6,padding:"10px 12px",color:C.t1,fontFamily:C.mono,fontSize:"0.72rem",outline:"none",resize:"vertical",boxSizing:"border-box",marginBottom:8}}
|
||||
onFocus={e=>e.target.style.borderColor=C.blue} onBlur={e=>e.target.style.borderColor=C.borderBright}
|
||||
/>
|
||||
<button onClick={decode} style={{padding:"9px 16px",background:C.blueMuted,border:`1px solid ${C.blue}40`,borderRadius:6,color:C.blue,fontFamily:C.mono,fontSize:"0.72rem",cursor:"pointer",fontWeight:700,marginBottom:10}}>COMPROBAR</button>
|
||||
<div style={{display:"flex",gap:8,alignItems:"stretch",marginBottom:10}}>
|
||||
<button onClick={decode} style={{padding:"9px 16px",background:C.blueMuted,border:`1px solid ${C.blue}40`,borderRadius:6,color:C.blue,fontFamily:C.mono,fontSize:"0.72rem",cursor:"pointer",fontWeight:700}}>COMPROBAR</button>
|
||||
<BotonQR campo="tx" color={C.blue} onLeido={v=>{ setInput(v); setResult(null); setErr(null); }}/>
|
||||
</div>
|
||||
{err&&<div style={{padding:"8px 12px",background:C.redMuted,border:`1px solid ${C.red}30`,borderRadius:6,color:C.red,fontFamily:C.mono,fontSize:"0.72rem"}}>{err}</div>}
|
||||
{result&&(
|
||||
<div style={{padding:"12px 14px",background:C.bg,borderRadius:6,border:`1px solid ${C.green}40`}}>
|
||||
|
||||
Reference in New Issue
Block a user