@pioneer-platform/pioneer-cache 1.0.8 → 1.1.1

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/CHANGELOG.md CHANGED
@@ -1,5 +1,22 @@
1
1
  # @pioneer-platform/pioneer-cache
2
2
 
3
+ ## 1.1.1
4
+
5
+ ### Patch Changes
6
+
7
+ - chore: Add view-only mode support and update dependencies
8
+
9
+ ## 1.1.0
10
+
11
+ ### Minor Changes
12
+
13
+ - Merge branch 'feature/ethereum-reports'
14
+
15
+ ### Patch Changes
16
+
17
+ - Updated dependencies
18
+ - @pioneer-platform/redis-queue@8.12.0
19
+
3
20
  ## 1.0.8
4
21
 
5
22
  ### Patch Changes
@@ -118,7 +118,20 @@ class PortfolioCache extends base_cache_1.BaseCache {
118
118
  }
119
119
  // Get asset metadata
120
120
  const assetData = require('@pioneer-platform/pioneer-discovery').assetData;
121
- const assetInfo = assetData[item.caip.toUpperCase()] || assetData[item.caip.toLowerCase()] || {};
121
+ const normalizedCaip = item.caip.toLowerCase();
122
+ let assetInfo = assetData[normalizedCaip] || assetData[item.caip.toUpperCase()] || assetData[item.caip] || {};
123
+ // EXPLICIT FIX: Force XRP to always be native (prevents token misclassification)
124
+ // GitHub Issue: XRP incorrectly showing as requiring BNB gas for sending
125
+ if (normalizedCaip === 'ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144') {
126
+ // Clone assetInfo and force type to native
127
+ assetInfo = { ...assetInfo, type: 'native' };
128
+ if (!assetInfo.symbol) {
129
+ log.warn(tag, `XRP asset lookup failed! Using fallback with forced native type.`);
130
+ assetInfo.symbol = 'XRP';
131
+ assetInfo.name = 'Ripple';
132
+ }
133
+ log.debug(tag, `XRP explicitly set to type: native`);
134
+ }
122
135
  // Get price
123
136
  let priceUsd = 0;
124
137
  try {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pioneer-platform/pioneer-cache",
3
- "version": "1.0.8",
3
+ "version": "1.1.1",
4
4
  "description": "Unified caching system for Pioneer platform with Redis backend",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -21,7 +21,7 @@
21
21
  "license": "MIT",
22
22
  "dependencies": {
23
23
  "@pioneer-platform/loggerdog": "^8.11.0",
24
- "@pioneer-platform/redis-queue": "^8.11.6",
24
+ "@pioneer-platform/redis-queue": "^8.12.0",
25
25
  "@pioneer-platform/default-redis": "^8.11.7"
26
26
  },
27
27
  "devDependencies": {
@@ -164,7 +164,21 @@ export class PortfolioCache extends BaseCache<PortfolioData> {
164
164
 
165
165
  // Get asset metadata
166
166
  const assetData = require('@pioneer-platform/pioneer-discovery').assetData;
167
- const assetInfo = assetData[item.caip.toUpperCase()] || assetData[item.caip.toLowerCase()] || {};
167
+ const normalizedCaip = item.caip.toLowerCase();
168
+ let assetInfo = assetData[normalizedCaip] || assetData[item.caip.toUpperCase()] || assetData[item.caip] || {};
169
+
170
+ // EXPLICIT FIX: Force XRP to always be native (prevents token misclassification)
171
+ // GitHub Issue: XRP incorrectly showing as requiring BNB gas for sending
172
+ if (normalizedCaip === 'ripple:4109c6f2045fc7eff4cde8f9905d19c2/slip44:144') {
173
+ // Clone assetInfo and force type to native
174
+ assetInfo = { ...assetInfo, type: 'native' };
175
+ if (!assetInfo.symbol) {
176
+ log.warn(tag, `XRP asset lookup failed! Using fallback with forced native type.`);
177
+ assetInfo.symbol = 'XRP';
178
+ assetInfo.name = 'Ripple';
179
+ }
180
+ log.debug(tag, `XRP explicitly set to type: native`);
181
+ }
168
182
 
169
183
  // Get price
170
184
  let priceUsd = 0;