Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -63,11 +63,25 @@ const Withdrawal = () => {
}
}

console.log("currencyInfo?.chains[networkName.value]?.network", currencyInfo?.chains[networkName.value]?.network)
console.log("currencyInfo?.chains[networkName.value]?.currency", currencyInfo?.chains[networkName.value]?.currency)

const sendWithdrawHandler = async (e) => {
e.preventDefault()
if (isLoading) return
setIsLoading(true)
sendWithdrawReq(amount.value, id, address.value, withdrawFee, `${currencyInfo?.chains[networkName.value]?.network} - ${currencyInfo?.chains[networkName.value]?.currency}`)

const withdrawRequestData = {
"currency": currencyInfo?.chains[networkName.value]?.currency,
"amount": amount.value,
"destSymbol": currencyInfo?.chains[networkName.value]?.currency,
"destAddress": address.value,
"destNetwork": currencyInfo?.chains[networkName.value]?.network,
/*"destNote": "Personal wallet", //Optional
"description": "Withdrawal to personal wallet" //Optional*/
}

sendWithdrawReq(withdrawRequestData)
.then(() => {
setNetworkName({value: 0, error: []})
setAmount({value: 0, error: []})
Expand All @@ -84,7 +98,9 @@ const Withdrawal = () => {
getUserAssets()
getUserAssetsEstimatedValue()
})
.catch(() => {
.catch((error) => {

console.log("error", error)
toast.error(t('error'));
})
.finally(() => setIsLoading(false))
Expand Down Expand Up @@ -188,7 +204,7 @@ const Withdrawal = () => {
<div className="column">
<span className={`my-05`}>
{t('commission')}: <span
className={`text-orange`}>{amount.value ? withdrawFee : 0} </span>
className={`text-orange`}>{withdrawFee ? withdrawFee : 0} </span>
<span>{t("currency." + id)}</span>
</span>
<span className={`my-05`}>
Expand Down
4 changes: 2 additions & 2 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9486,8 +9486,8 @@ __metadata:

"js-api-client@https://github.com/opexdev/js-api-client.git#develop":
version: 1.0.0-beta2
resolution: "js-api-client@https://github.com/opexdev/js-api-client.git#commit=0a3cb3b1a8cc9bfea52d8a13b469bcd676923c37"
checksum: 46415811da888600ce149284d02e7cec2bbfffea73bc80ff16406447466c0abb5ac6a21ff82eb8cb48d61c25d65d673b4afeb44afc906d9d7d51f04e7f9b80fe
resolution: "js-api-client@https://github.com/opexdev/js-api-client.git#commit=217ac93076c92fcedc157de8c949a9fdf7e9829d"
checksum: d9e88f2be37d4e8501d48a9986ea7e7d2ef4320752c92bcc12ed98d4bcaca3bb813bbc7cbc65a4f0ad9757b1cb181293c2c780201e787624d7f83fb37f70ce35
languageName: node
linkType: hard

Expand Down