Skip to content

Commit

Permalink
flow to usd
Browse files Browse the repository at this point in the history
  • Loading branch information
bjartek committed Aug 6, 2024
1 parent 212c533 commit 39e7ade
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions scripts/getFlowToUSD.cdc
Original file line number Diff line number Diff line change
@@ -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()
}

0 comments on commit 39e7ade

Please sign in to comment.