-
Notifications
You must be signed in to change notification settings - Fork 35
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
feat: add distict_id to estates and filter bids for distrincts #849
Conversation
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.
Looks good!
src/Asset/Estate/Estate.model.js
Outdated
@@ -63,4 +64,15 @@ export class Estate extends Model { | |||
WHERE ${BlockchainEventQueries.byArgs('_estateId', estateId)} | |||
OR (${BlockchainEventQueries.byArgs('_tokenId', estateId)} AND address = ${address})`) | |||
} | |||
|
|||
static async updateEstateDistrictIds() { |
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.
Maybe just updateDistrictIds
(we're already in Estate.model) or refreshDistrictIds
because update it's already a verb used in SQL
webapp/src/modules/bid/selectors.js
Outdated
@@ -46,6 +46,10 @@ export const getBidByAssetIdFactory = (assetId, assetType) => | |||
) | |||
|
|||
export const getWalletBidsByAsset = (state, asset, assetType) => { | |||
if (!asset) { | |||
return [] | |||
} |
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 is this needed?
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.
Because we are using the selector when you create an Estate and the asset is undefined. I should add a comment. What do you think?
distrinct_id
toEstate
columndistrict_ids
once monitor finishedowner of
from Estate details if it is a districtNote:
npm run migrate up