mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-11-11 14:48:14 +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:
@@ -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 {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user