Merged in fix/sw-3097-negative-point-transfer (pull request #2434)
fix(SW-3097): Improve handling when trying to transfer negative SAS points * Improve handling of trying to transfer negative points Approved-by: Linus Flood
This commit is contained in:
@@ -53,7 +53,7 @@ export function TransferPointsFormClient({
|
||||
const calculatedPoints = parsedPoints * (exchangeRate ?? 0)
|
||||
|
||||
const handleUpdatePoints = (points: number | null) => {
|
||||
setPointState(points)
|
||||
setPointState(points ? Math.min(Math.max(points, 0), sasPoints ?? 0) : null)
|
||||
}
|
||||
|
||||
const hasNoSasPoints = !sasPoints || sasPoints === 0
|
||||
|
||||
Reference in New Issue
Block a user