-
Notifications
You must be signed in to change notification settings - Fork 300
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
Support for combined values in OnNewData trait #903
Comments
The reason is that most of the time, the combined value will update when there is new data. If you put the logic of updated combined data into the new data hook, what you will end up is getting some false update hook call (hook called when value did not change), but that should be handled by normal business logic anyway. Oracle can feed the same price, and expected to do so when the market price actually did not move for a significant period of time. Let me know what do you think. I don't against this feature as long as it is actually useful. |
Mmm... I see 🤔 Currently, my pallet implements I have a workaround for this, which is using |
Your workaround is indeed the intended usage |
Hi!
As a user of
orml_oracle
, I miss the possibility of receiving callbacks when a combined value is updated. Currently,orml_oracle
only callsOnNewData::on_new_data()
with no combined values. It would be great to have anOnNewData::on_updated_combined_data()
or similar to that trait to be called when the value is combined.If you agree, I can open a PR. Seems simple, and it does not require any migration.
Thanks for your work!
The text was updated successfully, but these errors were encountered: