diff --git a/oracle/provider/shade.go b/oracle/provider/shade.go index ffcedab..4ee1a65 100644 --- a/oracle/provider/shade.go +++ b/oracle/provider/shade.go @@ -141,7 +141,7 @@ func (p *ShadeProvider) Poll() error { "token_code_hash": "%s" } }, - "amount":"%d" + "amount": "%d" }, "exclude_fee": true } @@ -166,6 +166,11 @@ func (p *ShadeProvider) Poll() error { price := strToDec(response.Simulation.Price) + _, found = p.pairs[pair.String()] + if !found { + price = uintToDec(1).Quo(price) + } + factor, err := computeDecimalsFactor(base.Decimals, quote.Decimals) if err != nil { continue @@ -261,6 +266,11 @@ func (p *ShadeProvider) init() { continue } + _, found := p.pairs[pair.String()] + if !found { + pair = pair.Swap() + } + denoms := []string{ pair.Base, pair.Quote,