MCPcopy Create free account
hub / github.com/ccxt/ccxt / getCurrencyFromChaincode

Method getCurrencyFromChaincode

js/src/woo.js:2670–2685  ·  view source on GitHub ↗
(networkizedCode, currency)

Source from the content-addressed store, hash-verified

2668 return this.safeString(types, type, type);
2669 }
2670 getCurrencyFromChaincode(networkizedCode, currency) {
2671 if (currency !== undefined) {
2672 return currency;
2673 }
2674 else {
2675 const parts = networkizedCode.split('_');
2676 const partsLength = parts.length;
2677 const firstPart = this.safeString(parts, 0);
2678 let currencyId = this.safeString(parts, 1, firstPart);
2679 if (partsLength > 2) {
2680 currencyId += '_' + this.safeString(parts, 2);
2681 }
2682 currency = this.safeCurrency(currencyId);
2683 }
2684 return currency;
2685 }
2686 /**
2687 * @method
2688 * @name woo#fetchDeposits

Callers 1

parseTransactionMethod · 0.95

Calls 3

splitMethod · 0.80
safeStringMethod · 0.45
safeCurrencyMethod · 0.45

Tested by

no test coverage detected