@sonarwatch/portfolio-core 0.12.43 → 0.12.45
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
|
@@ -2,6 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
This file was generated using [@jscutlery/semver](https://github.com/jscutlery/semver).
|
|
4
4
|
|
|
5
|
+
## [0.12.45](https://github.com/sonarwatch/portfolio/compare/core-0.12.44...core-0.12.45) (2024-07-01)
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
## [0.12.44](https://github.com/sonarwatch/portfolio/compare/core-0.12.43...core-0.12.44) (2024-07-01)
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
5
13
|
## [0.12.43](https://github.com/sonarwatch/portfolio/compare/core-0.12.42...core-0.12.43) (2024-07-01)
|
|
6
14
|
|
|
7
15
|
|
package/package.json
CHANGED
|
@@ -5,11 +5,11 @@ const Portfolio_1 = require("../Portfolio");
|
|
|
5
5
|
function getImageFromAsset(asset, tokenInfo) {
|
|
6
6
|
switch (asset.type) {
|
|
7
7
|
case Portfolio_1.PortfolioAssetType.collectible:
|
|
8
|
-
return asset.data.imageUri;
|
|
8
|
+
return asset.imageUri || asset.data.imageUri;
|
|
9
9
|
case Portfolio_1.PortfolioAssetType.token:
|
|
10
|
-
return tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.logoURI;
|
|
10
|
+
return asset.imageUri || (tokenInfo === null || tokenInfo === void 0 ? void 0 : tokenInfo.logoURI);
|
|
11
11
|
case Portfolio_1.PortfolioAssetType.generic:
|
|
12
|
-
return asset.data.imageUri;
|
|
12
|
+
return asset.imageUri || asset.data.imageUri;
|
|
13
13
|
default:
|
|
14
14
|
return null;
|
|
15
15
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"getImageFromAsset.js","sourceRoot":"","sources":["../../../../../packages/core/src/utils/getImageFromAsset.ts"],"names":[],"mappings":";;;AAAA,4CAAkE;AAGlE,SAAgB,iBAAiB,CAC/B,KAAqB,EACrB,SAAqB;IAErB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,8BAAkB,CAAC,WAAW;YACjC,OAAO,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;
|
|
1
|
+
{"version":3,"file":"getImageFromAsset.js","sourceRoot":"","sources":["../../../../../packages/core/src/utils/getImageFromAsset.ts"],"names":[],"mappings":";;;AAAA,4CAAkE;AAGlE,SAAgB,iBAAiB,CAC/B,KAAqB,EACrB,SAAqB;IAErB,QAAQ,KAAK,CAAC,IAAI,EAAE,CAAC;QACnB,KAAK,8BAAkB,CAAC,WAAW;YACjC,OAAO,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/C,KAAK,8BAAkB,CAAC,KAAK;YAC3B,OAAO,KAAK,CAAC,QAAQ,KAAI,SAAS,aAAT,SAAS,uBAAT,SAAS,CAAE,OAAO,CAAA,CAAC;QAC9C,KAAK,8BAAkB,CAAC,OAAO;YAC7B,OAAO,KAAK,CAAC,QAAQ,IAAI,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC;QAC/C;YACE,OAAO,IAAI,CAAC;IAChB,CAAC;AACH,CAAC;AAdD,8CAcC"}
|