mirror of
https://github.com/lightningnetwork/lnd.git
synced 2024-11-19 09:53:54 +01:00
zpay32: improve "wrong network" error message
This commit is contained in:
parent
938d367232
commit
c6499f095a
@ -290,7 +290,8 @@ func Decode(invoice string, net *chaincfg.Params) (*Invoice, error) {
|
||||
// The next characters should be a valid prefix for a segwit BIP173
|
||||
// address that match the active network.
|
||||
if !strings.HasPrefix(hrp[2:], net.Bech32HRPSegwit) {
|
||||
return nil, fmt.Errorf("unknown network")
|
||||
return nil, fmt.Errorf(
|
||||
"invoice not for current active network '%s'", net.Name)
|
||||
}
|
||||
decodedInvoice.Net = net
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user