refactor: switch to using newRat

This commit is contained in:
Derrick Hammer 2024-03-14 07:19:14 -04:00
parent 19afa09c4d
commit 7d87ed6ad7
Signed by: pcfreak30
GPG Key ID: C997C339BE476FF2
1 changed files with 3 additions and 3 deletions

View File

@ -151,9 +151,9 @@ SELECT AVG(rate) as average_rate FROM (
return err return err
} }
maxRPCPrice, ok := new(big.Rat).SetString(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice) maxRPCPrice, err := newRat(p.config.Config().Core.Storage.Sia.MaxRPCSCPrice, "max rpc price")
if !ok { if err != nil {
return errors.New("failed to parse max rpc price") return err
} }
maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000) maxRPCPrice = ratDivide(maxRPCPrice, 1_000_000)