diff --git a/admin/images/lbc.png b/admin/images/lbc.png new file mode 100644 index 0000000..86dcb8a Binary files /dev/null and b/admin/images/lbc.png differ diff --git a/classes/LBRY_Daemon.php b/classes/LBRY_Daemon.php index 84ccd44..483f986 100644 --- a/classes/LBRY_Daemon.php +++ b/classes/LBRY_Daemon.php @@ -69,15 +69,17 @@ class LBRY_Daemon /** * Returns the available balance of a current LBRY account - * https://lbry.tech/api/sdk#account_balance - * @param string $address Wallet Address - * @return float Wallet Balance + * https://lbry.tech/api/sdk#wallet_balance + * @param string $address Wallet Address + * @return array $wallet_balance Wallet Balance + * */ public function wallet_balance() { - try { - $result = $this->request('account_balance'); - return $result->result->available; + try { // Convert JSON string to an object + $result = $this->request('wallet_balance'); + return $result; + $wallet_balance = $result; } catch (LBRYDaemonException $e) { $this->logger->log('account_balance error', $e->getMessage() . ' | Code: ' . $e->getCode()); LBRY()->notice->set_notice('error', 'Issue getting account balance.'); diff --git a/templates/options_page.php b/templates/options_page.php index 320f2ea..a8cf308 100644 --- a/templates/options_page.php +++ b/templates/options_page.php @@ -1,13 +1,14 @@ daemon->wallet_balance(); +$available_balance = $wallet_balance->result->available; $channel_list = $LBRY->daemon->channel_list(); // TODO: Make this page look cleaner ?>

Your wallet amount:

- +