Merge pull request #51 from lbryio/claim-id-null-fix
fix issue with claim names being returned with a hash
This commit is contained in:
commit
0ca160336f
1 changed files with 5 additions and 0 deletions
|
@ -274,6 +274,7 @@ class BlockShell extends Shell {
|
||||||
self::unlock('buildindex');
|
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) {
|
protected function _getclaimfortxout($pubkeyasm, $tx_hash, $vout, $tx_time = null) {
|
||||||
$claim_data = null;
|
$claim_data = null;
|
||||||
$claim_stream_data = null;
|
$claim_stream_data = null;
|
||||||
|
@ -295,6 +296,10 @@ class BlockShell extends Shell {
|
||||||
if ($json) {
|
if ($json) {
|
||||||
$claim = json_decode($json);
|
$claim = json_decode($json);
|
||||||
if ($claim) {
|
if ($claim) {
|
||||||
|
if (strpos($claim_name, '#') !== false) {
|
||||||
|
$claim_name = substr($claim_name, 0, strpos($claim_name, '#'));
|
||||||
|
}
|
||||||
|
|
||||||
$req = ['method' => 'getvalueforname', 'params' => [$claim_name]];
|
$req = ['method' => 'getvalueforname', 'params' => [$claim_name]];
|
||||||
$json = null;
|
$json = null;
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue