14.05.2026 rip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { useConverter, progressPercent, findTier } from '@widgets/currency-converter'
|
||||
import { useDebounce } from '@shared/lib/hooks/useDebounce'
|
||||
import { usePaymentQuote, useCreateOrder } from '@features/payment'
|
||||
import { usePaymentQuote, usePaymentConfig, useCreateOrder } from '@features/payment'
|
||||
import { CommissionPanel } from './CommissionPanel'
|
||||
import { AgreementCheck } from './AgreementCheck'
|
||||
import styles from './ConverterSection.module.css'
|
||||
@@ -10,9 +10,12 @@ export function ConverterSection() {
|
||||
|
||||
const debouncedUsdt = useDebounce(c.numRub, 400)
|
||||
const { data: quote, isError: quoteError } = usePaymentQuote(debouncedUsdt)
|
||||
const { data: config } = usePaymentConfig()
|
||||
|
||||
const configUsdtRate = Number(config?.usdt_exchange_rate) || 0
|
||||
const gasPriceRub = Number(config?.gas_fee) * configUsdtRate
|
||||
|
||||
const usdtRate = Number(quote?.usdt_exchange_rate) || 0
|
||||
const gasPrice = Number(quote?.gas_fee) || 0
|
||||
|
||||
const rubTotal = quote?.total_price ?? ''
|
||||
const rubTotalNum = Number(rubTotal) || 0
|
||||
@@ -41,10 +44,10 @@ export function ConverterSection() {
|
||||
</div>
|
||||
<div className={styles.pills}>
|
||||
<div className={styles.pill}>
|
||||
Цена газа в RUB <span className={styles.pillValue}>{gasPrice.toFixed(2)} RUB</span>
|
||||
Цена газа в RUB <span className={styles.pillValue}>{gasPriceRub.toFixed(2)} RUB</span>
|
||||
</div>
|
||||
<div className={styles.pill}>
|
||||
USDT/RUB <span className={styles.pillValue}>{usdtRate.toFixed(2)} ₽</span>
|
||||
USDT/RUB <span className={styles.pillValue}>{configUsdtRate.toFixed(2)} ₽</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user