-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Claim metadata #62
Claim metadata #62
Conversation
marcdeb1
commented
Apr 6, 2019
- Added new metadata to the claim page and removed author (Add addional information to claim page #50 Remove or replace author #27). We can now view the claim bid and effective amount.
- Matched Blocked time and Created time in case of a chainquery resync (Block Time vs Created Time #52)
Hey @marcdeb1, thanks for this PR...I totally missed it! We'll get a review on it shortly. There will be a few more fields we'll eventually want to add from the metadata, but they aren't available in chainquery yet. |
@marcdeb1 They are actually available on dev for chainquery https://dev.chainquery.lbry.com/api/sql?query=SELECT%20*%20FROM%20chainquery.claim%20WHERE%20claim_id=%22c2bea0127e2543a5664e51cc32833851cf9dfda5%22 The commit is OdyseeTeam/chainquery@b1dab7c you can see the sql migration to see what columns were added. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nikooo777 Maybe we can deploy this to the dev/beta instance so we can do some live testing.
src/Template/Main/claims.ctp
Outdated
@@ -44,8 +44,9 @@ $cost = 'Free'; | |||
if (isset($claim->price) && $claim->price > 0) { | |||
$cost = $this->Amount->formatCurrency($claim->price) . ' LBC'; | |||
} else if (isset($claim->fee) && strtolower($claim->fee_currency) === 'lbc') { | |||
$cost = $this->Amount->formatCurrency($claim->fee) . ' LBC'; | |||
$cost = (float) ($claim->fee) . ' LBC'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why are we treating currency as a float? What was wrong with formatCurrency
?
src/Template/Main/claims.ctp
Outdated
} | ||
$effective_amount = $claim->effective_amount / 100000000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we create a const instead so the number makes sense?
@marcdeb1 did you still want to finish this PR? |
Ping @marcdeb1 :) |
I ran this locally,
Other than these two things, it looks good. I did not test the apis. |
@tiger5226 ship it? |
I looked into this tonight. The environment is a bit messy. There are 3 installations. I found the one being used by caddy, but its got the blocked endpoints branch loaded there. I will deploy this after I merge the other branch. We need to fix CI too. It would be nice if it just build a docker image too and auto deployed. |