fix(SendModal) missing icons for assets

In case of assets the symbol doesn't have an icon representation
in resources, hence we use the image of the asset itself.
Same fix used for header and delegate

Closes: #14218
This commit is contained in:
Stefan 2024-03-28 19:49:14 +02:00 committed by Stefan Dunca
parent a2e8b6ebd7
commit f9782d6863
2 changed files with 13 additions and 2 deletions

View File

@ -48,7 +48,10 @@ StatusListItem {
let balance = !!model && !!model.currentCurrencyBalance ? model.currentCurrencyBalance : 0
return root.formatCurrentCurrencyAmount(balance)
}
asset.name: symbol ? Style.png("tokens/" + symbol) : ""
// Community assets have a dedicated image streamed from status-go
asset.name: !!model.image
? model.image
: Constants.tokenIcon(symbol)
asset.isImage: true
asset.width: 32
asset.height: 32

View File

@ -98,7 +98,15 @@ Item {
}
property var assetIconSourceFn: function (asset) {
return !!asset && asset.symbol ? Style.png("tokens/%1".arg(asset.symbol)) : ""
if (!asset) {
return ""
} else if (asset.image) {
// Community assets have a dedicated image streamed from status-go
return asset.image
} else {
return Constants.tokenIcon(asset.symbol)
}
return ""
}
property var collectibleTextFn: function (item) {