Skip to content

Commit

Permalink
Merge pull request #9 from redstone-finance/ppe/gql-issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cedriking committed Sep 6, 2021
2 parents eaca38f + d868db4 commit fab20e8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,4 +108,5 @@ dist
.blocksdb
db.sqlite
.DS_Store
bin
bin
.idea
7 changes: 2 additions & 5 deletions src/graphql/query.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,20 +68,17 @@ export async function generateQuery(params: QueryParams, connection: Knex): Prom
}

if (tags) {
const tagsConverted = tagToB64(tags);
const names: string[] = [];
const values: string[] = [];

const subQuery = connection.queryBuilder().select('*').from('tags');

let runSubQuery = false;

for (const tag of tagsConverted) {
for (const tag of tags) {
let indexed = false;

for (const indice of indices) {
const index = toB64url(indice);

for (const index of indices) {
if (tag.name === index) {
indexed = true;
query.whereIn(`transactions.${index}`, tag.values);
Expand Down

0 comments on commit fab20e8

Please sign in to comment.