1
0
mirror of https://github.com/kremalicious/blog.git synced 2024-12-22 17:23:50 +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 Alert from '../Alert/Alert'
import { InputGroup } from '../Input' import { InputGroup } from '../Input'
import styles from './index.module.css' import styles from './index.module.css'
import { SendNative, SendErc20 } from '../Send' import { SendPrepareNative, SendPrepareErc20 } from '../SendPrepare'
import { useSend } from '../../hooks/useSend' import { useSend } from '../../hooks/useSend'
import type { SendFormData } from './types' import type { SendFormData } from './types'
import { useTokens } from '@features/Web3/hooks/useTokens' import { useTokens } from '@features/Web3/hooks/useTokens'
@ -51,12 +51,15 @@ export default function Web3Form(): ReactElement {
) : null} ) : null}
{selectedToken?.address === '0x0' ? ( {selectedToken?.address === '0x0' ? (
<SendNative <SendPrepareNative
amount={debouncedAmount} amount={debouncedAmount}
setSendFormData={setSendFormData} setSendFormData={setSendFormData}
/> />
) : ( ) : (
<SendErc20 amount={debouncedAmount} setSendFormData={setSendFormData} /> <SendPrepareErc20
amount={debouncedAmount}
setSendFormData={setSendFormData}
/>
)} )}
<div className={styles.disclaimer}> <div className={styles.disclaimer}>

View File

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

View File

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