fix: updated claim name availability check to support multiple claim addresses #382

Merged
bones7242 merged 8 commits from 348-multiple-wallet-addresses into master 2018-03-12 20:05:24 +01:00
bones7242 commented 2018-03-08 05:08:14 +01:00 (Migrated from github.com)
  • updated claimNameIsAvailable to check the Claim table rather than File table
  • updated claimNameIsAvailable to be able to check with multiple claim addresses
  • added a google analytics timing event for the api/claim/availability and api/channel/availability endpoints
- updated `claimNameIsAvailable` to check the Claim table rather than File table - updated `claimNameIsAvailable` to be able to check with multiple claim addresses - added a google analytics timing event for the `api/claim/availability` and `api/channel/availability` endpoints
kauffj (Migrated from github.com) reviewed 2018-03-08 23:02:08 +01:00
kauffj (Migrated from github.com) left a comment

Some feedback, but nothing blocking. You do not need to have me review the PR again to merge.

Some feedback, but nothing blocking. You do not need to have me review the PR again to merge.
kauffj (Migrated from github.com) commented 2018-03-08 23:01:10 +01:00

I'm confused by this function, though I would have been equally confused before this changeset. If we're querying our own DB, why do we have to consider just the ones with a certain address? Is that because the DB contains all claims?

Also, if the addresses are in the DB, can't this filtering be done in SQL rather than JS?

I'm confused by this function, though I would have been equally confused before this changeset. If we're querying our own DB, why do we have to consider just the ones with a certain address? Is that because the DB contains all claims? Also, if the addresses are in the DB, can't this filtering be done in SQL rather than JS?
kauffj (Migrated from github.com) commented 2018-03-08 21:06:10 +01:00

This seems like an odd pattern - what's this doing?

This seems like an odd pattern - what's this doing?
kauffj (Migrated from github.com) commented 2018-03-08 22:57:14 +01:00

Always use brackets for if statements IMO.

Also - is Prettier and/or a linter not set up for this project? It can catch and even fix ones like this.

Always use brackets for if statements IMO. Also - is Prettier and/or a linter not set up for this project? It can catch and even fix ones like this.
bones7242 (Migrated from github.com) reviewed 2018-03-12 19:48:03 +01:00
bones7242 (Migrated from github.com) commented 2018-03-12 19:48:03 +01:00

yes to linter, not yet to Prettier (#375)

yes to linter, not yet to Prettier (#375)
bones7242 (Migrated from github.com) reviewed 2018-03-12 20:05:19 +01:00
bones7242 (Migrated from github.com) commented 2018-03-12 20:05:19 +01:00

Yes, the table that is being queried contains all claims, so we have to filter out claims belonging to this address. I wonder if there would be reason to create a separate table for claims the site owns? We avoided doing that previously because it seemed to be unnecessarily duplicative.

Yes, the table that is being queried contains all claims, so we have to filter out claims belonging to this address. I wonder if there would be reason to create a separate table for claims the site owns? We avoided doing that previously because it seemed to be unnecessarily duplicative.
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: LBRYCommunity/spee.ch#382
No description provided.