Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix for Huobi withdraw fee (SOLO currency) #4530

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

atrcek
Copy link

@atrcek atrcek commented Jul 19, 2022

No description provided.

@timmolter
Copy link
Member

Is it really zero fee if it's returned null?

@atrcek
Copy link
Author

atrcek commented Jul 20, 2022

Yeah, it's more like "not available". This is the currency in question:
{
"currency": "solo",
"assetType": 1,
"chains": [
{
"chain": "solo",
"displayName": "SOLO",
"fullName": "XRP",
"baseChain": "XRP",
"baseChainProtocol": "XRPTOKEN",
"numOfConfirmations": 1,
"numOfFastConfirmations": 1,
"depositStatus": "allowed",
"minDepositAmt": "5",
"withdrawStatus": "prohibited",
"minWithdrawAmt": "5",
"withdrawPrecision": 7,
"maxWithdrawAmt": "9911613.000000000000000000",
"withdrawQuotaPerDay": "9911613.000000000000000000",
"withdrawQuotaPerYear": null,
"withdrawQuotaTotal": null,
"withdrawFeeType": "ratio",
"transactFeeRateWithdraw": "0.0002",
"addrWithTag": true,
"addrDepositTag": true
}
],
"instStatus": "normal"
}

Without this fix, service using the lib crashes at init, so this is a quick patch for the problem. I didn't want to set null, to avoid problems in other parts of code.
If anybody wants to use SOLO and requires info about withdraw fee, there are bigger changes needed in xchange-core - withdraw fee ratio (percent) would need to be added to meta data and possibly other places (note that currently SOLO is disabled for withdraw).

@walec51
Copy link
Collaborator

walec51 commented Aug 13, 2023

I think BigDecimal transactFeeWithdraw = huobiCurrency.getTransactFeeWithdraw() != null ? new BigDecimal(huobiCurrency.getTransactFeeWithdraw()) : null; would be a better solution as we use null to indicate unknown values

if you could change it to that that resolve the above conflict then I'll merge it this week

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants