@pioneer-platform/pioneer-cache 1.1.0 → 1.1.2
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
|
@@ -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
|
|
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
|
@@ -55,6 +55,8 @@ export interface BalanceData {
|
|
|
55
55
|
symbol?: string;
|
|
56
56
|
name?: string;
|
|
57
57
|
networkId?: string;
|
|
58
|
+
type?: string; // ✅ PHASE 1: Asset type (native, token, unknown)
|
|
59
|
+
isNative?: boolean; // ✅ PHASE 1: Whether asset is native to chain (backward compat)
|
|
58
60
|
}
|
|
59
61
|
|
|
60
62
|
/**
|
|
@@ -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
|
|
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;
|
package/.turbo/turbo-build.log
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
$ tsc
|