From 39e7adeae32f6e77a0f4a79499785110aea22c5f Mon Sep 17 00:00:00 2001 From: Bjarte Stien Karlsen Date: Tue, 6 Aug 2024 11:26:33 +0200 Subject: [PATCH] flow to usd --- scripts/getFlowToUSD.cdc | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) diff --git a/scripts/getFlowToUSD.cdc b/scripts/getFlowToUSD.cdc index 5dee7a7a..befc06fa 100644 --- a/scripts/getFlowToUSD.cdc +++ b/scripts/getFlowToUSD.cdc @@ -1,15 +1,6 @@ -import "PublicPriceOracle" +import "FIND" -access(all) fun main():UFix64? { +access(all) fun main():UFix64 { - let feeds = PublicPriceOracle.getAllSupportedOracles() - for address in feeds.keys { - - let name= feeds[address] - if name=="FLOW/USD" { - return PublicPriceOracle.getLatestPrice(oracleAddr: address) - } - - } - return nil + return FIND.getLatestPrice() }