From a897bc92a77cf24a1a34fecaad4b1206ed29fa46 Mon Sep 17 00:00:00 2001 From: 0xtekgrinder <0xtekgrinder@protonmail.com> Date: Fri, 17 Jan 2025 18:45:52 +0100 Subject: [PATCH] fix: correct Value() for feed --- examples/gno.land/p/demo/gnorkle/feeds/periodic/feed.gno | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/gno.land/p/demo/gnorkle/feeds/periodic/feed.gno b/examples/gno.land/p/demo/gnorkle/feeds/periodic/feed.gno index 1870538d008..83bed5eff2c 100644 --- a/examples/gno.land/p/demo/gnorkle/feeds/periodic/feed.gno +++ b/examples/gno.land/p/demo/gnorkle/feeds/periodic/feed.gno @@ -107,7 +107,8 @@ func (f *Feed) Ingest(funcType message.FuncType, msg, providerAddress string) er // Value returns the feed's latest value, it's data type, and whether or not it can // be safely consumed. In this case it can be consumed because it's a periodic feed. func (f Feed) Value() (feed.Value, string, bool) { - return f.storage.GetLatest(), f.valueDataType, false + lastValue := f.storage.GetLatest() + return lastValue, f.valueDataType, lastValue == feed.Value{} } // MarshalJSON marshals the components of the feed that are needed for