@icgio/icg-utils 1.9.11 → 1.9.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/constants/stablecoins.js +1 -1
- package/lib/utils.js +6 -6
- package/package.json +1 -1
package/constants/stablecoins.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
module.exports = ['DAI', '
|
|
1
|
+
module.exports = ['DAI', 'USD', 'USDC', 'USDD', 'USDJ', 'USDK', 'USDP', 'USDT']
|
package/lib/utils.js
CHANGED
|
@@ -808,15 +808,15 @@ module.exports.number_with_commas = (x) => {
|
|
|
808
808
|
return parts.join('.')
|
|
809
809
|
}
|
|
810
810
|
|
|
811
|
-
module.exports.
|
|
811
|
+
module.exports.exchange_cur_quote_cur_converter = (exchange_cur_quote_cur) => {
|
|
812
812
|
let exchange_pairs = {},
|
|
813
813
|
exchange_curs = {}
|
|
814
|
-
for (let exchange in
|
|
814
|
+
for (let exchange in exchange_cur_quote_cur) {
|
|
815
815
|
_.set(exchange_pairs, [exchange], [])
|
|
816
816
|
_.set(exchange_curs, [exchange], [])
|
|
817
|
-
for (let quote_cur in
|
|
818
|
-
exchange_pairs[exchange] = exchange_pairs[exchange].concat(_.map(
|
|
819
|
-
exchange_curs[exchange] = _.union(exchange_curs[exchange], _.union(
|
|
817
|
+
for (let quote_cur in exchange_cur_quote_cur[exchange]) {
|
|
818
|
+
exchange_pairs[exchange] = exchange_pairs[exchange].concat(_.map(exchange_cur_quote_cur[exchange][quote_cur], (cur) => cur + quote_cur))
|
|
819
|
+
exchange_curs[exchange] = _.union(exchange_curs[exchange], _.union(exchange_cur_quote_cur[exchange][quote_cur], [quote_cur]))
|
|
820
820
|
}
|
|
821
821
|
}
|
|
822
822
|
let pair_exchanges = {}
|
|
@@ -829,7 +829,7 @@ module.exports.exchange_basecur_curs_converter = (exchange_basecur_curs) => {
|
|
|
829
829
|
})
|
|
830
830
|
}
|
|
831
831
|
return {
|
|
832
|
-
|
|
832
|
+
exchange_cur_quote_cur,
|
|
833
833
|
exchange_pairs,
|
|
834
834
|
exchange_curs,
|
|
835
835
|
pair_exchanges,
|