1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 09:13:35 +01:00
This commit is contained in:
Matthias Kretschmann 2023-11-01 14:31:00 +00:00
parent c85c823812
commit 70f091368d
Signed by: m
GPG Key ID: 606EEEF3C479A91F
5 changed files with 8 additions and 5 deletions

View File

@ -5,7 +5,7 @@ import { ConnectButton } from '@rainbow-me/rainbowkit'
import Alert from '../Alert/Alert'
import { InputGroup } from '../Input'
import styles from './index.module.css'
import { SendNative, SendErc20 } from '../Send'
import { SendPrepareNative, SendPrepareErc20 } from '../SendPrepare'
import { useSend } from '../../hooks/useSend'
import type { SendFormData } from './types'
import { useTokens } from '@features/Web3/hooks/useTokens'
@ -51,12 +51,15 @@ export default function Web3Form(): ReactElement {
) : null}
{selectedToken?.address === '0x0' ? (
<SendNative
<SendPrepareNative
amount={debouncedAmount}
setSendFormData={setSendFormData}
/>
) : (
<SendErc20 amount={debouncedAmount} setSendFormData={setSendFormData} />
<SendPrepareErc20
amount={debouncedAmount}
setSendFormData={setSendFormData}
/>
)}
<div className={styles.disclaimer}>

View File

@ -5,7 +5,7 @@ import { abiErc20Transfer } from './abiErc20Transfer'
import { useEffect } from 'react'
import { useTokens } from '@features/Web3/hooks/useTokens'
export function SendErc20({
export function SendPrepareErc20({
amount,
setSendFormData
}: {

View File

@ -7,7 +7,7 @@ import {
import siteConfig from '@config/blog.config'
import { useEffect } from 'react'
export function SendNative({
export function SendPrepareNative({
amount,
setSendFormData
}: {