Skip to content

Commit 61abc63

Browse files
committed
Use clientNativeAmount for exchange rate validation in validateCurrencyLaunchpadClientExchangeData
1 parent 6033e83 commit 61abc63

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/code/currency/validation.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ func validateCurrencyLaunchpadClientExchangeData(ctx context.Context, data code_
174174
}
175175

176176
// For the valid native amount, is the exchange rate calculated correctly?
177-
expectedRate := new(big.Float).Quo(potentialNativeAmount, clientTokenUnits)
177+
expectedRate := new(big.Float).Quo(clientNativeAmount, clientTokenUnits)
178178
percentDiff := new(big.Float).Quo(new(big.Float).Abs(new(big.Float).Sub(clientRate, expectedRate)), expectedRate)
179179
if percentDiff.Cmp(rateErrorThreshold) > 0 {
180180
log.WithField("potential_exchange_rate", expectedRate).Info("exchange rate is outside error threshold")

0 commit comments

Comments
 (0)