From 7d87ed6ad7667a252c67ad880ea5cdeb03ad104c Mon Sep 17 00:00:00 2001 From: Derrick Hammer Date: Thu, 14 Mar 2024 07:19:14 -0400 Subject: [PATCH] refactor: switch to using newRat --- renter/price_tracker.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/renter/price_tracker.go b/renter/price_tracker.go index cb1b4c2..44c3e73 100644 --- a/renter/price_tracker.go +++ b/renter/price_tracker.go @@ -151,9 +151,9 @@ SELECT AVG(rate) as average_rate FROM ( return err } - maxRPCPrice, ok := new(big.Rat).SetString(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice) - if !ok { - return errors.New("failed to parse max rpc price") + maxRPCPrice, err := newRat(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice, "max rpc price") + if err != nil { + return err } maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)