Skip to content

Commit

Permalink
Adjust validation messages
Browse files Browse the repository at this point in the history
  • Loading branch information
WRadoslaw committed Mar 27, 2024
1 parent d9c5080 commit 1bd26e9
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,10 +263,10 @@ export const SellTokenModal = ({ tokenId, onClose: _onClose, show }: SellTokenMo
showTresholdButtons
validation={(value) => {
if (!value || value < 1) {
return 'You need to sell at least one token'
return 'You need to sell at least one token.'
}
if (value > ammBalance) return 'You cannot sell more tokens than available in the market'
if (value > userTokenBalance) return 'Amount exceeds your account balance'
if (value > ammBalance) return `There is only ${ammBalance} $${title} available in the market.`
if (value > userTokenBalance) return `Amount exceeds your account balance of ${userTokenBalance} $${title}.`
return true
}}
/>
Expand Down

0 comments on commit 1bd26e9

Please sign in to comment.