Skip to content

Commit

Permalink
Merge pull request #1393 from galacticcouncil/master
Browse files Browse the repository at this point in the history
master => rococo
  • Loading branch information
vkulinich-cl authored Jun 10, 2024
2 parents a3e8156 + bc0c0f2 commit 47af74e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/i18n/locales/en/translations.json
Original file line number Diff line number Diff line change
Expand Up @@ -596,7 +596,7 @@
"farms.modal.join.toast.onLoading": "<0>Joining farm with </0><1>{{ amount, bignumber(type: 'token') }}</1> <0>asset shares.</0>",
"farms.modal.join.toast.onSuccess": "<0>Joined farm with </0><1>{{ amount, bignumber(type: 'token') }}</1> <0>asset shares</0>.",
"farms.modal.join.step": "Join Farm {{number}} ",
"farms.modal.join.minDeposit": "Minimum for entering the farm is {{ value, bignumber(type: 'token') }} asset share",
"farms.modal.join.minDeposit": "Minimal deposit is not reached",
"farms.modal.footer.title": "Available asset shares",
"farms.modal.details.title": "Farm details",
"farms.modal.details.loyaltyRewards.label": "Loyalty rewards",
Expand Down
5 changes: 4 additions & 1 deletion src/sections/pools/farms/modals/join/JoinFarmsModal.utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ export const useZodSchema = (
.times(oraclePrice.data?.price?.n ?? 1)
.div(oraclePrice.data?.price?.d ?? 1)

return valueInHub.gte(minDeposit)
return (
valueInHub.gte(minDeposit) &&
scale(value, meta.decimals).gte(minDeposit)
)
},
t("farms.modal.join.minDeposit", {
value: scaleHuman(
Expand Down

0 comments on commit 47af74e

Please sign in to comment.