@medialane/sdk 0.111.0 → 0.111.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/dist/index.cjs +2 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1247,6 +1247,7 @@ function formatAmount(raw, decimals) {
|
|
|
1247
1247
|
return fractional ? `${whole}.${fractional}` : whole.toString();
|
|
1248
1248
|
}
|
|
1249
1249
|
function getTokenByAddress(address) {
|
|
1250
|
+
if (typeof address !== "string" || address.trim() === "") return void 0;
|
|
1250
1251
|
let target = null;
|
|
1251
1252
|
try {
|
|
1252
1253
|
target = BigInt(address);
|
|
@@ -1264,6 +1265,7 @@ function getTokenByAddress(address) {
|
|
|
1264
1265
|
});
|
|
1265
1266
|
}
|
|
1266
1267
|
function getTokenBySymbol(symbol) {
|
|
1268
|
+
if (typeof symbol !== "string") return void 0;
|
|
1267
1269
|
const upper = symbol.toUpperCase();
|
|
1268
1270
|
return SUPPORTED_TOKENS.find((t) => t.symbol === upper);
|
|
1269
1271
|
}
|