@pioneer-platform/maya-network 8.13.17 → 8.13.19

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.
@@ -1,2 +1 @@
1
-
2
- $ tsc -p .
1
+ $ tsc -p .
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pioneer-platform/maya-network
2
2
 
3
+ ## 8.13.19
4
+
5
+ ### Patch Changes
6
+
7
+ - Fix account info selection to prefer sources with more coins (CACAO + MAYA)
8
+
9
+ ## 8.13.18
10
+
11
+ ### Patch Changes
12
+
13
+ - fix(pioneer-nodes): remove broken node entry without service field
14
+
3
15
  ## 8.13.17
4
16
 
5
17
  ### Patch Changes
package/lib/index.js CHANGED
@@ -283,6 +283,13 @@ var get_account_info = function (address) {
283
283
  return current;
284
284
  if (bestAcctNum > 0 && currentAcctNum === 0)
285
285
  return best;
286
+ // CRITICAL: Prefer sources with MORE coins (to get both CACAO + MAYA)
287
+ var currentCoinCount = current.coins.length;
288
+ var bestCoinCount = best.coins.length;
289
+ if (currentCoinCount > bestCoinCount)
290
+ return current;
291
+ if (bestCoinCount > currentCoinCount)
292
+ return best;
286
293
  // Check for balance (coins array)
287
294
  var currentHasBalance = current.coins.length > 0;
288
295
  var bestHasBalance = best.coins.length > 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/maya-network",
3
- "version": "8.13.17",
3
+ "version": "8.13.19",
4
4
  "main": "./lib/index.js",
5
5
  "types": "./lib/index.d.ts",
6
6
  "scripts": {