@suilend/sui-fe 0.3.21 → 0.3.23
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/lib/coinMetadata.d.ts +1 -0
- package/lib/coinMetadata.js +1 -1
- package/lib/coinType.js +2 -0
- package/lib/indexedDB.js +1 -1
- package/package.json +1 -1
package/lib/coinMetadata.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { CoinMetadata } from "@mysten/sui/client";
|
|
2
2
|
export type Token = CoinMetadata & {
|
|
3
3
|
coinType: string;
|
|
4
|
+
raw?: CoinMetadata;
|
|
4
5
|
};
|
|
5
6
|
export declare const getToken: (coinType: string, coinMetadata: CoinMetadata) => Token;
|
|
6
7
|
export declare const getCoinMetadataMap: (uniqueCoinTypes: string[]) => Promise<Record<string, Token>>;
|
package/lib/coinMetadata.js
CHANGED
|
@@ -72,7 +72,7 @@ const getCoinMetadataMap = (uniqueCoinTypes) => __awaiter(void 0, void 0, void 0
|
|
|
72
72
|
? (0, coinType_1.extractCTokenCoinType)(coinType)
|
|
73
73
|
: coinType]) !== null && _a !== void 0 ? _a : token.iconUrl, symbol: (_c = (_b = coinType_1.COINTYPE_SYMBOL_MAP[(0, coinType_1.isCTokenCoinType)(coinType)
|
|
74
74
|
? (0, coinType_1.extractCTokenCoinType)(coinType)
|
|
75
|
-
: coinType]) !== null && _b !== void 0 ? _b : token.symbol) !== null && _c !== void 0 ? _c : (0, coinType_1.extractSymbolFromCoinType)(coinType) });
|
|
75
|
+
: coinType]) !== null && _b !== void 0 ? _b : token.symbol) !== null && _c !== void 0 ? _c : (0, coinType_1.extractSymbolFromCoinType)(coinType), raw: token });
|
|
76
76
|
}
|
|
77
77
|
return tokenMap;
|
|
78
78
|
}
|
package/lib/coinType.js
CHANGED
|
@@ -336,6 +336,8 @@ exports.isMemecoin = isMemecoin;
|
|
|
336
336
|
const isCoinType = (text) => {
|
|
337
337
|
if (text.includes("-"))
|
|
338
338
|
return false;
|
|
339
|
+
if (text.endsWith("::af_lp::AF_LP"))
|
|
340
|
+
return false; // Aftermath LP tokens
|
|
339
341
|
try {
|
|
340
342
|
(0, utils_1.normalizeStructTag)(text);
|
|
341
343
|
return true;
|
package/lib/indexedDB.js
CHANGED
|
@@ -10,7 +10,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
};
|
|
11
11
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
12
|
exports.removeTokensFromIndexedDB = exports.setTokenMapToIndexedDB = exports.getTokenMapByCoinTypeFromIndexedDB = exports.initDB = void 0;
|
|
13
|
-
const DB_NAME = "
|
|
13
|
+
const DB_NAME = "send";
|
|
14
14
|
const DB_VERSION = 1;
|
|
15
15
|
const TOKEN_STORE = "token";
|
|
16
16
|
const initDB = () => {
|
package/package.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"name":"@suilend/sui-fe","version":"0.3.
|
|
1
|
+
{"name":"@suilend/sui-fe","version":"0.3.23","private":false,"description":"A collection of TypeScript frontend libraries","author":"Suilend","license":"MIT","main":"./index.js","exports":{".":"./index.js","./lib/api":"./lib/api.js","./lib/coin":"./lib/coin.js","./lib/coinMetadata":"./lib/coinMetadata.js","./lib/coinType":"./lib/coinType.js","./lib/constants":"./lib/constants.js","./lib/format":"./lib/format.js","./lib":"./lib/index.js","./lib/indexedDB":"./lib/indexedDB.js","./lib/keypair":"./lib/keypair.js","./lib/ledger":"./lib/ledger.js","./lib/msafe":"./lib/msafe.js","./lib/track":"./lib/track.js","./lib/transactions":"./lib/transactions.js"},"types":"./index.js","scripts":{"build":"rm -rf ./dist && bun tsc","eslint":"eslint --fix \"./src/**/*.ts\"","prettier":"prettier --write \"./src/**/*\"","lint":"bun eslint && bun prettier && bun tsc --noEmit","release":"bun run build && bun ts-node ./release.ts && cd ./dist && npm publish --access public"},"repository":{"type":"git","url":"git+https://github.com/suilend/sui-fe.git"},"bugs":{"url":"https://github.com/suilend/sui-fe/issues"},"dependencies":{"@mysten/wallet-standard":"0.14.7","bignumber.js":"^9.1.2","blake2b":"^2.1.4","lodash":"^4.17.21","mixpanel-browser":"^2.56.0","next":"^15.0.3","p-limit":"3.1.0"},"devDependencies":{"@tsconfig/recommended":"^1.0.8","@types/blake2b":"^2.1.3","@types/lodash":"^4.17.13","@types/mixpanel-browser":"^2.50.2","@types/node":"^22.9.0","@typescript-eslint/eslint-plugin":"^8.14.0","@typescript-eslint/parser":"^8.14.0","eslint":"^9.14.0","eslint-config-next":"^15.0.3","eslint-config-prettier":"^9.1.0","eslint-plugin-import":"^2.31.0","eslint-plugin-prettier":"^5.2.1","prettier":"^3.3.3","ts-node":"^10.9.2","typescript":"^5.6.3"},"peerDependencies":{"@mysten/sui":"1.28.2","date-fns":"^4.1.0"}}
|