Wallet_Balance call now returns available balance

This commit is contained in:
Paul Kirby 2020-01-27 16:53:01 -06:00
parent 4752915e4d
commit 61a8544ece

View file

@ -67,7 +67,7 @@ class LBRY_Daemon
} }
/** /**
* Returns the balance of a current LBRY account * Returns the available balance of a current LBRY account
* https://lbry.tech/api/sdk#account_balance * https://lbry.tech/api/sdk#account_balance
* @param string $address Wallet Address * @param string $address Wallet Address
* @return float Wallet Balance * @return float Wallet Balance
@ -76,7 +76,7 @@ class LBRY_Daemon
{ {
try { try {
$result = $this->request('account_balance'); $result = $this->request('account_balance');
return $result->result; return $result->result->available;
} catch (LBRYDaemonException $e) { } catch (LBRYDaemonException $e) {
$this->logger->log('account_balance error', $e->getMessage() . ' | Code: ' . $e->getCode()); $this->logger->log('account_balance error', $e->getMessage() . ' | Code: ' . $e->getCode());
LBRY()->notice->set_notice('error', 'Issue getting account balance.'); LBRY()->notice->set_notice('error', 'Issue getting account balance.');