From 66ee5aedf6703a543229c039db9a3ba005f25427 Mon Sep 17 00:00:00 2001 From: Paul Kirby Date: Sat, 3 Nov 2018 18:37:32 -0500 Subject: [PATCH] Updated to v 0.3.0 dameon api --- classes/LBRY_Admin.php | 8 +++-- classes/LBRY_Daemon.php | 49 +++++++++++++++++++++--------- classes/LBRY_Network_Publisher.php | 5 +-- classes/lbrypress.php | 32 +++++++++---------- 4 files changed, 60 insertions(+), 34 deletions(-) diff --git a/classes/LBRY_Admin.php b/classes/LBRY_Admin.php index fa888f8..bde034e 100644 --- a/classes/LBRY_Admin.php +++ b/classes/LBRY_Admin.php @@ -116,11 +116,14 @@ class LBRY_Admin */ public function wallet_callback() { + // Get first available address from Daemon + $address = LBRY()->daemon->address_list(); + $address = is_array($address) && !empty($address) ? $address[0] : ''; printf( '', LBRY_WALLET, LBRY_SETTINGS, - isset($this->options[LBRY_WALLET]) ? esc_attr($this->options[LBRY_WALLET]) : '' + $address ); } @@ -145,7 +148,8 @@ class LBRY_Admin // TODO: Maybe make this more elegant? $options = ''; // Create options list, select current license - foreach (LBRY_AVAILABLE_LICENSES as $value => $name) { + // + foreach (LBRY()->licenses as $value => $name) { $selected = $this->options[LBRY_LICENSE] === $value; $options .= '