@stellar-expert/ui-framework 1.16.2 → 1.16.4

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.
@@ -21,7 +21,15 @@ import './asset-link.scss'
21
21
  * @param {*} [children] - Optional inner link text
22
22
  * @constructor
23
23
  */
24
- export const AssetLink = React.memo(function AssetLink({asset, link, issuer, icon, className, style, children: innerText}) {
24
+ export const AssetLink = React.memo(function AssetLink({
25
+ asset,
26
+ link,
27
+ issuer,
28
+ icon,
29
+ className,
30
+ style,
31
+ children: innerText
32
+ }) {
25
33
  if (!(asset instanceof AssetDescriptor)) {
26
34
  asset = AssetDescriptor.parse(asset)
27
35
  }
@@ -54,12 +62,19 @@ export const AssetLink = React.memo(function AssetLink({asset, link, issuer, ico
54
62
  } else {
55
63
  children = <>{shortenString(asset.poolId)}</>
56
64
  }
65
+ } else if (asset.isContract) {
66
+ children = <>
67
+ <AssetWarningStatus meta={meta}/>
68
+ {!!meta?.code && <>{meta.code} </>}
69
+ {(issuer !== false || !meta?.code) &&
70
+ <AccountAddress account={asset.contract} chars={8} link={false} icon={!!icon}
71
+ title={meta?.tokenName}/>}
72
+ </>
57
73
  } else {
58
74
  children = <>
59
75
  <AssetWarningStatus meta={meta}/>
60
76
  {icon !== false && <AssetIcon asset={asset}/>}
61
77
  {!!asset.code && asset.code}
62
- {!!asset.isContract && <AccountAddress account={asset.contract} chars={8} link={false} icon={false}/>}
63
78
  {issuer !== false && <AssetIssuer asset={asset}/>}
64
79
  </>
65
80
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stellar-expert/ui-framework",
3
- "version": "1.16.2",
3
+ "version": "1.16.4",
4
4
  "description": "StellarExpert shared UI components library",
5
5
  "main": "index.js",
6
6
  "module": "./index.js",