2022-03-02 14:24:39 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
import QtQuick.Controls 2.13
|
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
import StatusQ.Controls 0.1
|
|
|
|
import StatusQ.Popups 0.1
|
|
|
|
|
|
|
|
import "../panels"
|
|
|
|
import "../stores"
|
|
|
|
|
|
|
|
StatusModal {
|
|
|
|
id: popup
|
|
|
|
x: Math.round(((parent ? parent.width : 0) - width) / 2)
|
|
|
|
y: Math.round(((parent ? parent.height : 0) - height) / 2)
|
|
|
|
height: 480
|
|
|
|
property WalletStore walletStore
|
2022-04-04 11:26:30 +00:00
|
|
|
header.title: qsTr("Manage Assets")
|
2022-03-02 14:24:39 +00:00
|
|
|
|
|
|
|
rightButtons: [
|
|
|
|
StatusButton {
|
2022-04-04 11:26:30 +00:00
|
|
|
text: qsTr("Add custom token")
|
2022-03-02 14:24:39 +00:00
|
|
|
onClicked: {
|
|
|
|
addShowTokenModal.openEditable();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
|
|
contentItem: TokenSettingsModalContent {
|
|
|
|
id: settingsModalContent
|
|
|
|
anchors.left: parent.left
|
|
|
|
anchors.right: parent.right
|
|
|
|
anchors.leftMargin: Style.current.padding
|
|
|
|
anchors.rightMargin: Style.current.padding
|
|
|
|
defaultTokenList: walletStore.defaultTokenList
|
|
|
|
customTokenList: walletStore.customTokenList
|
|
|
|
|
|
|
|
onToggleVisibleClicked: {
|
2022-04-04 12:11:39 +00:00
|
|
|
walletStore.toggleVisible(chainId, address)
|
2022-03-02 14:24:39 +00:00
|
|
|
}
|
|
|
|
onRemoveCustomTokenTriggered: {
|
|
|
|
walletStore.removeCustomToken(chainId, address)
|
|
|
|
}
|
|
|
|
onShowTokenDetailsTriggered: {
|
|
|
|
addShowTokenModal.openWithData(chainId, address, name, symbol, decimals);
|
|
|
|
}
|
|
|
|
|
|
|
|
AddShowTokenModal{
|
|
|
|
id: addShowTokenModal
|
|
|
|
walletStore: root.walletStore
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|