multi-account: update sendtoaddress
This commit is contained in:
parent
e6a4b3d1fd
commit
93b33edbcd
1 changed files with 7 additions and 1 deletions
|
@ -1764,8 +1764,14 @@ func sendToAddress(icmd interface{}, w *wallet.Wallet) (interface{}, error) {
|
|||
cmd.Address: amt,
|
||||
}
|
||||
|
||||
// Use specified scope, if provided.
|
||||
scope, err := lookupKeyScope(cmd.AddressType)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
// sendtoaddress always spends from the default account, this matches bitcoind
|
||||
return sendPairs(w, pairs, waddrmgr.KeyScopeBIP0044, waddrmgr.DefaultAccountNum, 1,
|
||||
return sendPairs(w, pairs, scope, waddrmgr.DefaultAccountNum, 1,
|
||||
txrules.DefaultRelayFeePerKb)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue