2024-09-10 12:56:19 +00:00
|
|
|
|
import QtQuick 2.15
|
|
|
|
|
import QtQuick.Layouts 1.15
|
|
|
|
|
import QtQuick.Controls 2.15
|
|
|
|
|
|
|
|
|
|
import AppLayouts.Wallet.panels 1.0
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
|
|
Pane {
|
|
|
|
|
readonly property var assetsData: [
|
|
|
|
|
{
|
2024-09-18 11:03:36 +00:00
|
|
|
|
tokensKey: "stt_key",
|
2024-09-10 12:56:19 +00:00
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Status Test Token",
|
|
|
|
|
currencyBalanceAsString: "42,23 USD",
|
|
|
|
|
symbol: "STT",
|
|
|
|
|
iconSource: Constants.tokenIcon("STT"),
|
|
|
|
|
balances: [
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,56",
|
|
|
|
|
iconUrl: "network/Network=Ethereum"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,22",
|
|
|
|
|
iconUrl: "network/Network=Arbitrum"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,12",
|
|
|
|
|
iconUrl: "network/Network=Optimism"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
2024-09-23 08:15:01 +00:00
|
|
|
|
sectionName: ""
|
2024-09-10 12:56:19 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
2024-09-18 11:03:36 +00:00
|
|
|
|
tokensKey: "eth_key",
|
2024-09-10 12:56:19 +00:00
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Ether",
|
|
|
|
|
currencyBalanceAsString: "4 276,86 USD",
|
|
|
|
|
symbol: "ETH",
|
|
|
|
|
iconSource: Constants.tokenIcon("ETH"),
|
|
|
|
|
balances: [
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "1,01",
|
|
|
|
|
iconUrl: "network/Network=Optimism"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,47",
|
|
|
|
|
iconUrl: "network/Network=Arbitrum"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
balanceAsString: "0,12",
|
|
|
|
|
iconUrl: "network/Network=Ethereum"
|
|
|
|
|
}
|
|
|
|
|
],
|
|
|
|
|
|
2024-09-23 08:15:01 +00:00
|
|
|
|
sectionName: ""
|
2024-09-10 12:56:19 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
2024-09-18 11:03:36 +00:00
|
|
|
|
tokensKey: "dai_key",
|
2024-09-10 12:56:19 +00:00
|
|
|
|
communityId: "",
|
|
|
|
|
name: "Dai Stablecoin",
|
|
|
|
|
currencyBalanceAsString: "45,92 USD",
|
|
|
|
|
symbol: "DAI",
|
|
|
|
|
iconSource: Constants.tokenIcon("DAI"),
|
|
|
|
|
balances: [],
|
|
|
|
|
|
2024-09-23 08:15:01 +00:00
|
|
|
|
sectionName: "Popular assets"
|
2024-09-10 12:56:19 +00:00
|
|
|
|
},
|
|
|
|
|
{
|
2024-09-18 11:03:36 +00:00
|
|
|
|
tokensKey: "zrx_key",
|
2024-09-10 12:56:19 +00:00
|
|
|
|
communityId: "",
|
|
|
|
|
name: "0x",
|
|
|
|
|
currencyBalanceAsString: "41,22 USD",
|
|
|
|
|
symbol: "ZRX",
|
|
|
|
|
iconSource: Constants.tokenIcon("ZRX"),
|
|
|
|
|
balances: [],
|
|
|
|
|
|
2024-11-08 11:22:13 +00:00
|
|
|
|
sectionName: "Popular assets"
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
tokensKey: "abc_key",
|
|
|
|
|
communityId: "",
|
|
|
|
|
name: "0x",
|
|
|
|
|
currencyBalanceAsString: "41,22 USD",
|
|
|
|
|
symbol: "ABC",
|
|
|
|
|
iconSource: Constants.tokenIcon("ABC"),
|
|
|
|
|
balances: [],
|
|
|
|
|
|
2024-09-23 08:15:01 +00:00
|
|
|
|
sectionName: "Popular assets"
|
2024-09-10 12:56:19 +00:00
|
|
|
|
}
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
ListModel {
|
|
|
|
|
id: assetsModel
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: append(assetsData)
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
Rectangle {
|
|
|
|
|
anchors.fill: panel
|
|
|
|
|
anchors.margins: -1
|
|
|
|
|
|
|
|
|
|
color: "transparent"
|
|
|
|
|
border.color: "lightgray"
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
SearchableAssetsPanel {
|
|
|
|
|
id: panel
|
|
|
|
|
|
|
|
|
|
anchors.centerIn: parent
|
|
|
|
|
|
2024-09-18 11:03:36 +00:00
|
|
|
|
width: 450
|
|
|
|
|
highlightedKey: "key_2"
|
2024-09-10 12:56:19 +00:00
|
|
|
|
|
|
|
|
|
model: assetsModel
|
2024-09-18 11:03:36 +00:00
|
|
|
|
|
|
|
|
|
onSelected: console.log("selected:", key)
|
2024-09-10 12:56:19 +00:00
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// category: Panels
|