@icgio/icg-utils 1.7.36 → 1.7.37

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.
Files changed (2) hide show
  1. package/lib/utils.js +2 -1
  2. package/package.json +1 -1
package/lib/utils.js CHANGED
@@ -703,7 +703,8 @@ module.exports.parse_pair = function (pair) {
703
703
  ;[pair, time] = _.split(pair, '_')
704
704
  let result = ''
705
705
  if (stablecoins.some((c) => pair.endsWith(c))) {
706
- result = [pair.substr(0, pair.length - c.length), pair.substr(pair.length - 4, pair.length)]
706
+ let stablecoin = stablecoins.find((c) => pair.endsWith(c))
707
+ result = [pair.substr(0, pair.length - stablecoin.length), pair.substr(pair.length - stablecoin.length, pair.length)]
707
708
  } else if (pair.endsWith('QC')) {
708
709
  result = [pair.substr(0, pair.length - 2), pair.substr(pair.length - 2, pair.length)]
709
710
  } else {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@icgio/icg-utils",
3
- "version": "1.7.36",
3
+ "version": "1.7.37",
4
4
  "description": "Utils package.",
5
5
  "main": "index.js",
6
6
  "directories": {