2024-09-02 09:35:18 +00:00
|
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
|
|
import AppLayouts.Wallet.controls 1.0
|
|
|
|
|
import StatusQ.Core.Theme 0.1
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
|
readonly property var assetsData: [
|
|
|
|
|
{
|
|
|
|
|
tokensKey: "key_1",
|
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Status Test Token",
|
|
|
|
|
currencyBalanceAsString: "42,23 USD",
|
|
|
|
|
symbol: "STT",
|
|
|
|
|
iconSource: Constants.tokenIcon("STT"),
|
|
|
|
|
tokensKey: "STT",
|
|
|
|
|
|
|
|
|
|
balances: [
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,56",
|
|
|
|
|
iconUrl: "network/Network=Ethereum"
|
|
|
|
|
}
|
2024-09-10 12:56:19 +00:00
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
sectionText: "My assets on Mainnet"
|
2024-09-02 09:35:18 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
tokensKey: "key_2",
|
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Ether",
|
|
|
|
|
currencyBalanceAsString: "4 276,86 USD",
|
|
|
|
|
symbol: "ETH",
|
|
|
|
|
iconSource: Constants.tokenIcon("ETH"),
|
|
|
|
|
tokensKey: "ETH",
|
|
|
|
|
|
|
|
|
|
balances: [
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,12",
|
|
|
|
|
iconUrl: "network/Network=Ethereum"
|
|
|
|
|
}
|
2024-09-10 12:56:19 +00:00
|
|
|
|
],
|
|
|
|
|
|
|
|
|
|
sectionText: "My assets on Mainnet"
|
2024-09-02 09:35:18 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
tokensKey: "key_2",
|
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Dai Stablecoin",
|
|
|
|
|
currencyBalanceAsString: "45,92 USD",
|
|
|
|
|
symbol: "DAI",
|
|
|
|
|
iconSource: Constants.tokenIcon("DAI"),
|
|
|
|
|
tokensKey: "DAI",
|
2024-09-10 12:56:19 +00:00
|
|
|
|
balances: [],
|
2024-09-02 09:35:18 +00:00
|
|
|
|
|
2024-09-10 12:56:19 +00:00
|
|
|
|
sectionText: "Popular assets"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
tokensKey: "key_3",
|
|
|
|
|
communityId: "",
|
|
|
|
|
name: "0x",
|
|
|
|
|
currencyBalanceAsString: "41,22 USD",
|
|
|
|
|
symbol: "ZRX",
|
|
|
|
|
iconSource: Constants.tokenIcon("ZRX"),
|
|
|
|
|
tokensKey: "ZRX",
|
|
|
|
|
balances: [],
|
|
|
|
|
|
|
|
|
|
sectionText: "Popular assets"
|
2024-09-02 09:35:18 +00:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
|
id: assetsModel
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: append(assetsData)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
background: Rectangle {
|
|
|
|
|
color: Theme.palette.baseColor3
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
AssetSelector {
|
|
|
|
|
id: panel
|
|
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
2024-09-10 12:56:19 +00:00
|
|
|
|
model: assetsModel
|
|
|
|
|
sectionProperty: "sectionText"
|
2024-09-02 09:35:18 +00:00
|
|
|
|
|
2024-09-10 12:56:19 +00:00
|
|
|
|
onSelected: console.log("asset selected:", key)
|
2024-09-02 09:35:18 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// category: Controls
|