Skip to content

Commit

Permalink
fix: relayer gas estimation (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamewozniak authored Aug 21, 2024
1 parent 37218d4 commit 17e698e
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions relayer/relayer/client/gas_estimate.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,13 +88,13 @@ func EstimateGasFee(
}

// execute multiplier
fee, ok := math.NewIntFromString(responseBody.TotalFee)
if !ok {
return math.ZeroInt(), fmt.Errorf("failed to convert total fee to int")
fee, err := math.LegacyNewDecFromStr(responseBody.TotalFee)
if err != nil {
return math.ZeroInt(), err
}
m, ok := math.NewIntFromString(multiplier)
if !ok {
return fee, nil
mul, err := math.LegacyNewDecFromStr(multiplier)
if err != nil {
return math.ZeroInt(), err
}
return fee.Mul(m), nil
return fee.Mul(mul).TruncateInt(), nil
}

0 comments on commit 17e698e

Please sign in to comment.