Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/ccxt/ccxt
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] committed Jan 31, 2025
2 parents e4a6b61 + ad8e374 commit 188c6c6
Show file tree
Hide file tree
Showing 9 changed files with 17 additions and 9 deletions.
3 changes: 2 additions & 1 deletion cs/ccxt/exchanges/okx.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1788,7 +1788,8 @@ public async override Task<object> fetchCurrencies(object parameters = null)
object networkId = this.safeString(chain, "chain");
if (isTrue(isTrue((!isEqual(networkId, null))) && isTrue((isGreaterThanOrEqual(getIndexOf(networkId, "-"), 0)))))
{
object parts = slice(((string)networkId).Split(new [] {((string)"-")}, StringSplitOptions.None).ToList<object>(), 1, null);
object idParts = ((string)networkId).Split(new [] {((string)"-")}, StringSplitOptions.None).ToList<object>();
object parts = this.arraySlice(idParts, 1);
object chainPart = String.Join("-", ((IList<object>)parts).ToArray());
object networkCode = this.networkIdToCode(chainPart, getValue(currency, "code"));
object precision = this.parsePrecision(this.safeString(chain, "wdTickSz"));
Expand Down
3 changes: 2 additions & 1 deletion dist/ccxt.browser.js
Original file line number Diff line number Diff line change
Expand Up @@ -243397,7 +243397,8 @@ class okx extends _abstract_okx_js__WEBPACK_IMPORTED_MODULE_0__/* ["default"] */
currencyActive = (active) ? active : currencyActive;
const networkId = this.safeString(chain, 'chain');
if ((networkId !== undefined) && (networkId.indexOf('-') >= 0)) {
const parts = networkId.split('-').slice(1);
const idParts = networkId.split('-');
const parts = this.arraySlice(idParts, 1);
const chainPart = parts.join('-');
const networkCode = this.networkIdToCode(chainPart, currency['code']);
const precision = this.parsePrecision(this.safeString(chain, 'wdTickSz'));
Expand Down
2 changes: 1 addition & 1 deletion dist/ccxt.browser.min.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion dist/cjs/src/okx.js
Original file line number Diff line number Diff line change
Expand Up @@ -1815,7 +1815,8 @@ class okx extends okx$1 {
currencyActive = (active) ? active : currencyActive;
const networkId = this.safeString(chain, 'chain');
if ((networkId !== undefined) && (networkId.indexOf('-') >= 0)) {
const parts = networkId.split('-').slice(1);
const idParts = networkId.split('-');
const parts = this.arraySlice(idParts, 1);
const chainPart = parts.join('-');
const networkCode = this.networkIdToCode(chainPart, currency['code']);
const precision = this.parsePrecision(this.safeString(chain, 'wdTickSz'));
Expand Down
3 changes: 2 additions & 1 deletion js/src/okx.js
Original file line number Diff line number Diff line change
Expand Up @@ -1818,7 +1818,8 @@ export default class okx extends Exchange {
currencyActive = (active) ? active : currencyActive;
const networkId = this.safeString(chain, 'chain');
if ((networkId !== undefined) && (networkId.indexOf('-') >= 0)) {
const parts = networkId.split('-').slice(1);
const idParts = networkId.split('-');
const parts = this.arraySlice(idParts, 1);
const chainPart = parts.join('-');
const networkCode = this.networkIdToCode(chainPart, currency['code']);
const precision = this.parsePrecision(this.safeString(chain, 'wdTickSz'));
Expand Down
3 changes: 2 additions & 1 deletion php/async/okx.php
Original file line number Diff line number Diff line change
Expand Up @@ -1841,7 +1841,8 @@ public function fetch_currencies($params = array ()): PromiseInterface {
$currencyActive = ($active) ? $active : $currencyActive;
$networkId = $this->safe_string($chain, 'chain');
if (($networkId !== null) && (mb_strpos($networkId, '-') !== false)) {
$parts = explode(mb_substr('-', $networkId), 1);
$idParts = explode('-', $networkId);
$parts = $this->array_slice($idParts, 1);
$chainPart = implode('-', $parts);
$networkCode = $this->network_id_to_code($chainPart, $currency['code']);
$precision = $this->parse_precision($this->safe_string($chain, 'wdTickSz'));
Expand Down
3 changes: 2 additions & 1 deletion php/okx.php

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion python/ccxt/async_support/okx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1820,7 +1820,8 @@ async def fetch_currencies(self, params={}) -> Currencies:
currencyActive = active if (active) else currencyActive
networkId = self.safe_string(chain, 'chain')
if (networkId is not None) and (networkId.find('-') >= 0):
parts = networkId.split('-')[1:]
idParts = networkId.split('-')
parts = self.array_slice(idParts, 1)
chainPart = '-'.join(parts)
networkCode = self.network_id_to_code(chainPart, currency['code'])
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
Expand Down
3 changes: 2 additions & 1 deletion python/ccxt/okx.py
Original file line number Diff line number Diff line change
Expand Up @@ -1819,7 +1819,8 @@ def fetch_currencies(self, params={}) -> Currencies:
currencyActive = active if (active) else currencyActive
networkId = self.safe_string(chain, 'chain')
if (networkId is not None) and (networkId.find('-') >= 0):
parts = networkId.split('-')[1:]
idParts = networkId.split('-')
parts = self.array_slice(idParts, 1)
chainPart = '-'.join(parts)
networkCode = self.network_id_to_code(chainPart, currency['code'])
precision = self.parse_precision(self.safe_string(chain, 'wdTickSz'))
Expand Down

0 comments on commit 188c6c6

Please sign in to comment.