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
networks unification - okx, huobi, hitbtc #16024
Conversation
[ci-skip]
js/base/Exchange.js
Outdated
@@ -1685,6 +1686,17 @@ module.exports = class Exchange { | |||
* @param {string|undefined} currencyCode unified currency code, but this argument is not required by default, unless there is an exchange (like huobi) that needs an override of the method to be able to pass currencyCode argument additionally | |||
* @returns {[string|undefined]} exchange-specific network id | |||
*/ | |||
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.
so, this change only affects if exchange has hasUniqueNetworkIds
to true in options. thus, this change doesn't affect any existing implementations (other than HUOBI & OKX)
js/okx.js
Outdated
@@ -3566,36 +3632,11 @@ module.exports = class okx extends Exchange { | |||
* @param {object} params extra parameters specific to the okx api endpoint | |||
* @returns {object} an [address structure]{@link https://docs.ccxt.com/en/latest/manual.html#address-structure} | |||
*/ | |||
const rawNetwork = this.safeStringUpper (params, 'network'); |
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.
all these lines below are similar as it was in huobi/bybit/cexio in old version, and like we replaced in huobi/bybit/cexio, here also replaced by our base network methods
@carlosmiei this is the final state of my planned version. So, both HUOBI & OKX have currency-specific ids for networks, and they do share very similar approaches, thus, I've moved the code in base. additional problem with OKX is that it doesn't provide the correct data from fetchCurrencies (as mentioned in comments) and I had to add extra method ( |
…o okx-networks-unification
… end of constructor [ci skip]
this PR has been vastly transformed and migrated ino #18495