fix: 修改充值提现配置和充值接口
This commit is contained in:
@@ -85,6 +85,7 @@ export function useWithdrawVm() {
|
||||
withdraw: {
|
||||
...baseConfig.withdraw,
|
||||
banks: baseConfig.withdraw.banks,
|
||||
payChannels: baseConfig.withdraw.payChannels,
|
||||
},
|
||||
}
|
||||
}, [withdrawConfigQuery.data])
|
||||
@@ -109,17 +110,25 @@ export function useWithdrawVm() {
|
||||
const selectedRate = selectedCurrency.withdrawCoinsPerFiatValue || 1
|
||||
const sortedPayChannels = useMemo(
|
||||
() =>
|
||||
[...config.payChannels]
|
||||
[
|
||||
...(config.withdraw.payChannels.length > 0
|
||||
? config.withdraw.payChannels
|
||||
: config.payChannels),
|
||||
]
|
||||
.filter((channel) => channel.status === 1)
|
||||
.sort((left, right) => left.sort - right.sort),
|
||||
[config.payChannels],
|
||||
[config.payChannels, config.withdraw.payChannels],
|
||||
)
|
||||
const sortedBanks = useMemo(
|
||||
() =>
|
||||
[...config.withdraw.banks]
|
||||
.filter((bank) => bank.status === 1)
|
||||
.filter(
|
||||
(bank) =>
|
||||
bank.status === 1 &&
|
||||
(!bank.currencyCode || bank.currencyCode === selectedCurrency.code),
|
||||
)
|
||||
.sort((left, right) => left.sort - right.sort),
|
||||
[config.withdraw.banks],
|
||||
[config.withdraw.banks, selectedCurrency.code],
|
||||
)
|
||||
const availableBalance = Number(currentUser?.coin ?? 0)
|
||||
const maxWithdrawAmount = Math.max(0, Math.floor(availableBalance))
|
||||
|
||||
Reference in New Issue
Block a user