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

fix: balance query with custom transaction model #59

Merged
merged 4 commits into from
Jul 6, 2022

Conversation

dolcalmi
Copy link
Contributor

@dolcalmi dolcalmi commented Jan 28, 2022

Problem

Custom schema attributes are not setup correctly for balance query

Solution

  • Use parseFilterQuery logic
  • Keep meta attribute only for snapshot related methods

Maybe not the cleaner solution but doesn't change other collections schema/behavior


Related issue: #58

@dolcalmi dolcalmi marked this pull request as ready for review January 28, 2022 04:00
Copy link
Collaborator

@koresar koresar left a comment

Choose a reason for hiding this comment

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

Missing a unit test in balance.spec.ts where we would query a balance of a custom schema.

spec/parseBalanceQuery.spec.ts Show resolved Hide resolved
@Uzlopak
Copy link
Collaborator

Uzlopak commented Apr 5, 2022

I was on vacation for 3 weeks. I will have a look at it today or tomorrow.

@Uzlopak
Copy link
Collaborator

Uzlopak commented Jun 29, 2022

@dolcalmi

You want to work on this now? :)

@dolcalmi
Copy link
Contributor Author

dolcalmi commented Jul 5, 2022

@dolcalmi

You want to work on this now? :)

if you have a better/cleaner approach let me know, I will be glad to help

Copy link
Collaborator

@Uzlopak Uzlopak left a comment

Choose a reason for hiding this comment

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

I dont see any dangerous code.

@Uzlopak
Copy link
Collaborator

Uzlopak commented Jul 5, 2022

Btw. When the balance snapshotting was implemented I was not very happy about the fact that i did not quite understood the mechanics completely. So I worked the last months on the mongoose code, to get deeper understanding regarding the mongodb and mongoose. Fun Fact: I am now an official contributor of mongoose - LOL.

I will maybe, when I have time inspect the snapshotting of balances further more to ensure we have no race conditions or so.

@koresar koresar merged commit 6f36e1b into flash-oss:master Jul 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants