diff --git a/JoyboyCommunity/src/modules/TipModal/index.tsx b/JoyboyCommunity/src/modules/TipModal/index.tsx index fd559111..3371e8d8 100644 --- a/JoyboyCommunity/src/modules/TipModal/index.tsx +++ b/JoyboyCommunity/src/modules/TipModal/index.tsx @@ -1,6 +1,5 @@ import {NDKEvent} from '@nostr-dev-kit/ndk'; import {useAccount} from '@starknet-react/core'; -import {Fraction} from '@uniswap/sdk-core'; import {forwardRef, useState} from 'react'; import {View} from 'react-native'; import {SafeAreaView} from 'react-native-safe-area-context'; @@ -16,7 +15,6 @@ import {useTransactionModal} from '../../hooks/modals'; import {useDialog} from '../../hooks/modals/useDialog'; import {useTransaction} from '../../hooks/modals/useTransaction'; import {useWalletModal} from '../../hooks/modals/useWalletModal'; -import {decimalsScale} from '../../utils/helpers'; import {TipSuccessModalProps} from '../TipSuccessModal'; import stylesheet from './styles'; @@ -59,9 +57,7 @@ export const TipModal = forwardRef( } const amountUint256 = uint256.bnToUint256( - new Fraction(1, Math.ceil(1 / Number(amount))) - .multiply(decimalsScale(TOKENS[token][CHAIN_ID].decimals)) - .toFixed(0), + Math.ceil(Number(amount) * 10 ** TOKENS[token][CHAIN_ID].decimals), ); const approveCallData = CallData.compile([ diff --git a/JoyboyCommunity/src/screens/Tips/index.tsx b/JoyboyCommunity/src/screens/Tips/index.tsx index 8b62b0ca..fa980624 100644 --- a/JoyboyCommunity/src/screens/Tips/index.tsx +++ b/JoyboyCommunity/src/screens/Tips/index.tsx @@ -125,7 +125,7 @@ export const Tips: React.FC = () => { { deposit_id: cairo.felt(depositId), starknet_recipient: connectedAccount.address, - gas_token_address: ETH[CHAIN_ID].address, + gas_token_address: tokenAddress, gas_amount: uint256.bnToUint256(0), }, {