@clonegod/ttd-core 3.1.102 → 3.1.103
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 +8 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -235,13 +235,17 @@ const format_token_symbol = (symbol) => {
|
|
|
235
235
|
return /^[A-Z0-9]+$/.test(cleaned) ? cleaned : '';
|
|
236
236
|
};
|
|
237
237
|
exports.format_token_symbol = format_token_symbol;
|
|
238
|
+
const PAIR_SYMBOL_ALIAS = {
|
|
239
|
+
USDC: 'USDT', USD1: 'USDT', USDG: 'USDT',
|
|
240
|
+
WTRX: 'TRX', WSOL: 'SOL', WBTC: 'BTC',
|
|
241
|
+
WETH: 'ETH', WBNB: 'BNB', WOKB: 'OKB',
|
|
242
|
+
};
|
|
238
243
|
const format_pair_symbol = (symbol) => {
|
|
244
|
+
var _a;
|
|
239
245
|
if (!symbol)
|
|
240
246
|
return symbol;
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
.replace('WTRX', 'TRX').replace('WSOL', 'SOL').replace('WBTC', 'BTC')
|
|
244
|
-
.replace('WETH', 'ETH').replace('WBNB', 'BNB').replace('WOKB', 'OKB');
|
|
247
|
+
const s = (0, exports.format_token_symbol)(symbol);
|
|
248
|
+
return (_a = PAIR_SYMBOL_ALIAS[s]) !== null && _a !== void 0 ? _a : s;
|
|
245
249
|
};
|
|
246
250
|
exports.format_pair_symbol = format_pair_symbol;
|
|
247
251
|
const format_unique_orderbook_id = (chain_id, dex_id, pool_id, fee_rate) => {
|