mirror of
https://github.com/status-im/status-desktop.git
synced 2025-02-09 05:05:29 +00:00
Also added error handling in case in case that crypto symbol image is not available Added a way to display the balance in currently selected currency on the widget To do this the consumer of this widget needs to implement "getCurrencyBalanceString" based on the currently selected currency fixes #4079
41 lines
973 B
QML
41 lines
973 B
QML
import QtQuick 2.14
|
|
import QtQuick.Controls 2.14
|
|
import QtQuick.Layouts 1.14
|
|
|
|
import StatusQ.Core 0.1
|
|
import StatusQ.Core.Theme 0.1
|
|
import StatusQ.Controls 0.1
|
|
import StatusQ.Popups 0.1
|
|
|
|
import Sandbox 0.1
|
|
|
|
Column {
|
|
spacing: 8
|
|
|
|
StatusAssetSelector {
|
|
getCurrencyBalanceString: function (currencyBalance) {
|
|
return currencyBalance.toFixed(2) + " USD"
|
|
}
|
|
tokenAssetSourceFn: function (symbol) {
|
|
return "../../assets/img/icons/snt.svg"
|
|
}
|
|
assets: ListModel {
|
|
ListElement {
|
|
address: "0x1234"
|
|
name: "Status Network Token"
|
|
balance: "20"
|
|
symbol: "SNT"
|
|
currencyBalance: 9992.01
|
|
}
|
|
ListElement {
|
|
address: "0x1234"
|
|
name: "DAI Token"
|
|
balance: "15"
|
|
symbol: "DAI"
|
|
currencyBalance: 20.00001
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|