[lbry] added staked value to balance call
This commit is contained in:
parent
23f883be7e
commit
1d0ef1da6d
3 changed files with 5 additions and 6 deletions
|
@ -89,7 +89,7 @@ func NewRPCClient(chainParams *chaincfg.Params, connect, user, pass string, cert
|
||||||
|
|
||||||
// BackEnd returns the name of the driver.
|
// BackEnd returns the name of the driver.
|
||||||
func (c *RPCClient) BackEnd() string {
|
func (c *RPCClient) BackEnd() string {
|
||||||
return ""
|
return "lbcd"
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start attempts to establish a client connection with the remote server.
|
// Start attempts to establish a client connection with the remote server.
|
||||||
|
|
|
@ -542,7 +542,6 @@ func getAddressInfo(icmd interface{}, w *wallet.Wallet) (interface{}, error) {
|
||||||
// type embeddedAddressInfo struct {
|
// type embeddedAddressInfo struct {
|
||||||
// # Address string `json:"address"`
|
// # Address string `json:"address"`
|
||||||
// # ScriptPubKey string `json:"scriptPubKey"`
|
// # ScriptPubKey string `json:"scriptPubKey"`
|
||||||
// Solvable bool `json:"solvable"`
|
|
||||||
// Descriptor *string `json:"desc,omitempty"`
|
// Descriptor *string `json:"desc,omitempty"`
|
||||||
// IsScript bool `json:"isscript"`
|
// IsScript bool `json:"isscript"`
|
||||||
// IsChange bool `json:"ischange"`
|
// IsChange bool `json:"ischange"`
|
||||||
|
@ -649,8 +648,7 @@ func getInfo(icmd interface{}, w *wallet.Wallet, chainClient *chain.RPCClient) (
|
||||||
// to using the manager version.
|
// to using the manager version.
|
||||||
info.WalletVersion = int32(waddrmgr.LatestMgrVersion)
|
info.WalletVersion = int32(waddrmgr.LatestMgrVersion)
|
||||||
info.Balance = bal.ToBTC()
|
info.Balance = bal.ToBTC()
|
||||||
_ = staked // TODO: add this to lbcd:
|
info.Staked = staked.ToBTC()
|
||||||
// info.Staked = staked.ToBTC()
|
|
||||||
info.PaytxFee = float64(txrules.DefaultRelayFeePerKb)
|
info.PaytxFee = float64(txrules.DefaultRelayFeePerKb)
|
||||||
// We don't set the following since they don't make much sense in the
|
// We don't set the following since they don't make much sense in the
|
||||||
// wallet architecture:
|
// wallet architecture:
|
||||||
|
|
|
@ -2655,8 +2655,9 @@ func (w *Wallet) ListUnspent(minconf, maxconf int32,
|
||||||
ScriptPubKey: hex.EncodeToString(output.PkScript),
|
ScriptPubKey: hex.EncodeToString(output.PkScript),
|
||||||
Amount: output.Amount.ToBTC(),
|
Amount: output.Amount.ToBTC(),
|
||||||
Confirmations: int64(confs),
|
Confirmations: int64(confs),
|
||||||
Spendable: spendable, // presently false for stakes
|
Spendable: spendable,
|
||||||
// TODO: add an IsStake flag here to lbcd
|
// Solvable: , TODO: make this work
|
||||||
|
IsStake: isStake(output.PkScript),
|
||||||
}
|
}
|
||||||
|
|
||||||
// BUG: this should be a JSON array so that all
|
// BUG: this should be a JSON array so that all
|
||||||
|
|
Loading…
Reference in a new issue