From e8eaf1949062967ec215f60ecede28bb2885ea2c Mon Sep 17 00:00:00 2001 From: Akinwale Ariwodola Date: Sat, 26 Jan 2019 13:41:10 +0100 Subject: [PATCH] fix issue with claim names being returned with a hash --- src/Shell/BlockShell.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Shell/BlockShell.php b/src/Shell/BlockShell.php index f7530a8..21793ee 100644 --- a/src/Shell/BlockShell.php +++ b/src/Shell/BlockShell.php @@ -274,6 +274,7 @@ class BlockShell extends Shell { self::unlock('buildindex'); } + // TODO: Refactor for unique claim identification by claim_id instead of using the claim name. protected function _getclaimfortxout($pubkeyasm, $tx_hash, $vout, $tx_time = null) { $claim_data = null; $claim_stream_data = null; @@ -295,6 +296,10 @@ class BlockShell extends Shell { if ($json) { $claim = json_decode($json); if ($claim) { + if (strpos($claim_name, '#') !== false) { + $claim_name = substr($claim_name, 0, strpos($claim_name, '#')); + } + $req = ['method' => 'getvalueforname', 'params' => [$claim_name]]; $json = null; try {