@t2000/engine 1.0.1 → 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/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { z } from 'zod';
|
|
2
|
-
import { ALL_NAVI_ASSETS, getDecimalsForCoinType, resolveSymbol, normalizeCoinType, assertAllowedAsset, SUPPORTED_ASSETS, getSwapQuote, extractTransferDetails, classifyTransaction } from '@t2000/sdk';
|
|
2
|
+
import { ALL_NAVI_ASSETS, getDecimalsForCoinType, resolveSymbol, isInRegistry, normalizeCoinType, assertAllowedAsset, SUPPORTED_ASSETS, getSwapQuote, extractTransferDetails, classifyTransaction } from '@t2000/sdk';
|
|
3
3
|
import { randomUUID } from 'crypto';
|
|
4
4
|
import { readdirSync, readFileSync } from 'fs';
|
|
5
5
|
import { join } from 'path';
|
|
@@ -920,7 +920,7 @@ async function fetchPortfolioFromBlockVision(address, apiKey) {
|
|
|
920
920
|
const rawCoins = json.result.coins ?? [];
|
|
921
921
|
const coins = rawCoins.map((c) => {
|
|
922
922
|
const coinType = c.coinType;
|
|
923
|
-
const symbol = c.symbol || resolveSymbol(coinType);
|
|
923
|
+
const symbol = isInRegistry(coinType) ? resolveSymbol(coinType) : c.symbol || resolveSymbol(coinType);
|
|
924
924
|
const decimals = typeof c.decimals === "number" ? c.decimals : getDecimalsForCoinType(coinType);
|
|
925
925
|
const stablePrice = STABLE_USD_PRICES[coinType];
|
|
926
926
|
const apiPrice = parseNumberOrNull(c.price);
|