mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 01:36:24 +01:00
rpc: make NewWitnessAddress return np2wkh addresses
This commit modifies NewWitnessAddress to return nested p2wkh address. We do this as this RPC call was put in place to be used within GUI’s to allow users to deposit funds into their LN wallet. By using nested p2wkh, we ensure that the generate address that can be used to directly create channels.
This commit is contained in:
parent
d49172aa50
commit
6ad803b99c
1 changed files with 3 additions and 1 deletions
|
@ -245,7 +245,9 @@ func (r *rpcServer) NewWitnessAddress(ctx context.Context,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addr, err := r.server.cc.wallet.NewAddress(lnwallet.WitnessPubKey, false)
|
addr, err := r.server.cc.wallet.NewAddress(
|
||||||
|
lnwallet.NestedWitnessPubKey, false,
|
||||||
|
)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue