Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release: 2.3.5 #185

Merged
merged 9 commits into from
Jan 17, 2025
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@mento-protocol/mento-web",
"version": "2.3.4",
"version": "2.3.5",
"description": "A simple DApp for Celo Mento exchanges",
"keywords": [
"Celo",
Expand Down
2 changes: 1 addition & 1 deletion src/components/nav/Footer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { isStale } from 'src/utils/time'

export function Footer() {
return (
<div className="z-20 inline-flex justify-between w-full p-3 mt-10 sm:px-5 sm:py-7 pt-7">
<div className="z-10 inline-flex justify-between w-full p-3 mt-10 sm:px-5 sm:py-7 pt-7">
<div className="inline-flex items-start justify-start gap-4">
<div className="p-2 justify-start items-start gap-2.5 flex">
<FooterIconLink to={links.twitter} imgSrc={Twitter} alt="Twitter" />
Expand Down
4 changes: 2 additions & 2 deletions src/features/swap/useFormValidator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Tokens, getTokenAddress, getTokenByAddress } from 'src/config/tokens'
import { AccountBalances } from 'src/features/accounts/fetchBalances'
import { getMentoSdk } from 'src/features/sdk'
import { SwapFormValues } from 'src/features/swap/types'
import { areAmountsNearlyEqual, parseAmount, toWei } from 'src/utils/amount'
import { parseAmount, toWei } from 'src/utils/amount'
import { logger } from 'src/utils/logger'
import { useChainId } from 'wagmi'

Expand All @@ -23,7 +23,7 @@ export function useFormValidator(balances: AccountBalances, lastUpdated: number
const tokenId = values.fromTokenId
const tokenBalance = balances[tokenId]
const weiAmount = toWei(parsedAmount, Tokens[values.fromTokenId].decimals)
if (weiAmount.gt(tokenBalance) && !areAmountsNearlyEqual(weiAmount, tokenBalance)) {
if (weiAmount.gt(tokenBalance)) {
return { amount: 'Amount exceeds balance' }
}
const { exceeds, errorMsg } = await checkTradingLimits(values, chainId)
Expand Down
2 changes: 1 addition & 1 deletion src/layout/Dropdown.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ export function DropdownMenu({
leaveTo="transform opacity-0 scale-95"
>
<Menu.Items
className={`z-40 absolute -right-1.5 mt-3 origin-top-right rounded-md bg-white shadow-md drop-shadow-md ring-1 ring-black ring-opacity-5 focus:outline-none ${menuClasses}`}
className={`z-50 absolute -right-1.5 mt-3 origin-top-right rounded-md bg-white shadow-md drop-shadow-md ring-1 ring-black ring-opacity-5 focus:outline-none ${menuClasses}`}
>
{menuItems.map((mi, i) => (
<Menu.Item key={`menu-item-${i}`}>{mi}</Menu.Item>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/amount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export function toWei(
decimals = STANDARD_TOKEN_DECIMALS
): BigNumber {
if (!value) return new BigNumber(0)
const valueString = value.toString().trim()
const valueString = new BigNumber(value).toFixed().trim()
const components = valueString.split('.')
if (components.length === 1) {
return new BigNumber(parseUnits(valueString, decimals).toString())
Expand Down
Loading