-
-
Notifications
You must be signed in to change notification settings - Fork 7.3k
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
Huobi - withdraw fix #16061
Huobi - withdraw fix #16061
Conversation
[ci-skip]
…o okx-networks-unification
@@ -1715,7 +1727,13 @@ module.exports = class Exchange { | |||
} | |||
} | |||
} | |||
return networkId; | |||
if (this.options['hasUniqueNetworkIds']) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ttodua this option does not seem very "self-explanatory", what if instead of the option we checked the size of networkChainIdsByNames/networkNamesByChainIds
? If bigger than 0, means we have this logic, wdyt?
@@ -1741,6 +1773,11 @@ module.exports = class Exchange { | |||
return networkCode; | |||
} | |||
|
|||
getCommonNetworkNameFromId (networkId, currencyCode = undefined) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this basically "safeNetwork()"?
const response = await this.spotPrivatePostV1DwWithdrawApiCreate (this.extend (request, paramsOmited)); | ||
request['chain'] = this.networkCodeToId (networkCode, code); | ||
} | ||
amount = parseFloat (this.currencyToPrecision (code, amount, networkCode)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ttodua can we replace all parseFloat
occurrences with parseNumber
? parseFloat
does not take into consideration the precision mode (float or string) chosen by the user
const chains = this.safeValue (entry, 'chains', []); | ||
const networks = {}; | ||
this.options['networkChainIdsByNames'][code] = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ttodua I know this is not the right place but can't highlight it now, but I just want to ask, aren't we missing the 'usdt' chain to represent the OMNI?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@carlosmiei no, there is no OMNI (at least, at this moment, might have been in the past).
you can see that https://api.huobi.pro/v2/reference/currencies and also when I visually check HUOBI withdraw page, there is also no "omni ( usdt )" ooption. there are only those 8 chains that you have screenshoted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ttodua ok never mind then, probably docs are outdated, thanks for checking it
replaced with #16024 |
(this PR is based on #16024 so, should be reviewed after that PR is merged)
this PR fixes the inclusive-fees issue, as endpoint says: https://huobiapi.github.io/docs/spot/v1/en/#create-a-withdraw-request
you have to include
fee
in request to make an exact withdraw amount. otherwise, user will need to calculate fees on his own (from currencies->network->fee)(related to #15789 and #16016)