From 67f70465e980092fe42718f6846bc82029770f71 Mon Sep 17 00:00:00 2001 From: Davide Grilli Date: Wed, 22 Jul 2026 14:29:05 +0200 Subject: [PATCH] Warn users that withdrawals only support P2WPKH bech32 addresses MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit embit's address_to_scriptpubkey only knows Bitcoin's network prefixes, not PLM's — so a legacy P2PKH address (prefix 55, "P...") silently produces a None scriptpubkey instead of a clear rejection, and P2SH only works by coincidence. Until the address decoding is fixed to use PLM's own network prefixes, surface the current limitation to users in the withdrawal form and the user guide instead of letting them lose funds to a broken address. Co-Authored-By: Claude Sonnet 5 --- app/static/index.html | 1 + docs/guida-utente.md | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/app/static/index.html b/app/static/index.html index c0246e4..a6cbe75 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -453,6 +453,7 @@

Invia fondi a un indirizzo PLM esterno

+

Solo indirizzi P2WPKH bech32 (quelli che iniziano con plm1q...). Indirizzi legacy (P...) o P2SH non sono supportati.

diff --git a/docs/guida-utente.md b/docs/guida-utente.md index 64027a3..97ec7cd 100644 --- a/docs/guida-utente.md +++ b/docs/guida-utente.md @@ -104,6 +104,11 @@ Form con due campi: Il prelievo viene costruito e trasmesso sulla rete; la fee di rete viene scalata dall'importo richiesto (non si aggiunge separatamente). +> **Nota**: attualmente è supportato solo l'indirizzo esterno in formato +> **P2WPKH bech32** (quelli che iniziano con `plm1q...`). Non inserire +> indirizzi legacy (quelli che iniziano con `P...`) o P2SH: al momento +> non sono gestiti correttamente dal server. + ### Profilo Due card: