Skip to content

Commit

Permalink
fix: STRK claim (#228)
Browse files Browse the repository at this point in the history
  • Loading branch information
ugur-eren authored Jul 19, 2024
1 parent 9edd41d commit f6b0651
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 6 deletions.
6 changes: 1 addition & 5 deletions JoyboyCommunity/src/modules/TipModal/index.tsx
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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';

Expand Down Expand Up @@ -59,9 +57,7 @@ export const TipModal = forwardRef<Modalize, TipModalProps>(
}

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([
Expand Down
2 changes: 1 addition & 1 deletion JoyboyCommunity/src/screens/Tips/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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),
},
{
Expand Down

0 comments on commit f6b0651

Please sign in to comment.