From 3179b7ac5d47c4bf47a121e24252a9e43d81dc80 Mon Sep 17 00:00:00 2001 From: Paul Kirby Date: Thu, 4 Oct 2018 18:47:32 -0500 Subject: [PATCH] Fixed wallet balance call --- classes/LBRY_Daemon.php | 12 ++---------- classes/lbrypress.php | 1 + templates/options_page.php | 2 +- 3 files changed, 4 insertions(+), 11 deletions(-) diff --git a/classes/LBRY_Daemon.php b/classes/LBRY_Daemon.php index 37ea92b..e63b0d1 100644 --- a/classes/LBRY_Daemon.php +++ b/classes/LBRY_Daemon.php @@ -33,17 +33,9 @@ class LBRY_Daemon * @param string $address Wallet Address * @return float Wallet Balance */ - public function wallet_balance($address = '') + public function wallet_balance() { - $address = $address ?: get_option(LBRY_SETTINGS)[LBRY_WALLET]; - error_log('Address: ' . $address); - $result = $this->request('wallet_balance', array( - 'address' => $address, - 'include_unconfirmed' => true - )); - - error_log($result); - + $result = $this->request('wallet_balance'); return json_decode($result)->result; } diff --git a/classes/lbrypress.php b/classes/lbrypress.php index f21be12..d8abbb3 100644 --- a/classes/lbrypress.php +++ b/classes/lbrypress.php @@ -152,6 +152,7 @@ class LBRYPress // Add options to the options table we need if (! get_option(LBRY_SETTINGS)) { // Get a wallet address + // TODO: May have to rethink this based on how wallet address are linked to daemon $wallet_address = $this->daemon->wallet_unused_address(); // Default options diff --git a/templates/options_page.php b/templates/options_page.php index 85bf502..70aaf15 100644 --- a/templates/options_page.php +++ b/templates/options_page.php @@ -8,7 +8,7 @@ $channel_list = $LBRY->daemon->channel_list();

Your wallet amount:

- +