Skip to content

Commit

Permalink
Fixed answers request for activities
Browse files Browse the repository at this point in the history
  • Loading branch information
lostystyg committed Jul 8, 2022
1 parent f3a2026 commit 638c874
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/pocketdb/repositories/web/WebRpcRepository.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4615,21 +4615,21 @@ namespace PocketDb
a.BlockNum as BlockNum,
null,
pa.String1,
paa.String2,
paa.String3,
paa.String4,
ifnull(ra.Value,0),
null,
null,
null,
null,
c.Hash,
c.Type,
c.String1,
c.Height,
c.BlockNum,
null,
pc.String1,
null,
null,
null,
null
pca.String2,
pca.String3,
null, -- Badge
ifnull(rca.Value,0)
from Transactions c indexed by Transactions_Type_Last_String1_String2_Height -- My comments
Expand All @@ -4650,23 +4650,24 @@ namespace PocketDb
left join Payload pa
on pa.TxHash = a.Hash
left join Transactions aa
on aa.Type = 100
and aa.Last = 1
and aa.String1 = a.String1
and aa.Height > 0
left join Transactions ca
on ca.Type = 100
and ca.Last = 1
and ca.String1 = c.String1
and ca.Height > 0
left join Payload paa
on paa.TxHash = aa.Hash
left join Payload pca
on pca.TxHash = ca.Hash
left join Ratings ra indexed by Ratings_Type_Id_Last_Height
on ra.Type = 0
and ra.Id = aa.Id
and ra.Last = 1
left join Ratings rca indexed by Ratings_Type_Id_Last_Height
on rca.Type = 0
and rca.Id = ca.Id
and rca.Last = 1
where c.Type in (204, 205)
and c.Last = 1
and c.Height > 0
)sql",
[this](std::shared_ptr<sqlite3_stmt*>& stmt, int& i, QueryParams const& queryParams) {
TryBindStatementInt64(stmt, i++, queryParams.heightMin);
Expand Down

0 comments on commit 638c874

Please sign in to comment.