Skip to content
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

Merged
merged 3 commits into from
Feb 21, 2019

Conversation

nachomazzara
Copy link
Contributor

@nachomazzara nachomazzara commented Feb 19, 2019

  • Add distrinct_id to Estate column
  • Set Estate district_ids once monitor finished
  • Do not index bids for districts
  • Do not show bid button on a district details
  • Hide owner of from Estate details if it is a district

Note:

npm run migrate up

Copy link
Contributor

@nicosantangelo nicosantangelo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@@ -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() {
Copy link
Contributor

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

@@ -46,6 +46,10 @@ export const getBidByAssetIdFactory = (assetId, assetType) =>
)

export const getWalletBidsByAsset = (state, asset, assetType) => {
if (!asset) {
return []
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed?

Copy link
Contributor Author

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?

src/Asset/Estate/Estate.model.js Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants