status-desktop/ui/app/AppLayouts/Profile/stores/WalletStore.qml

54 lines
1.7 KiB
QML
Raw Normal View History

import QtQuick 2.13
import utils 1.0
QtObject {
id: root
property var accountsModule
property var networksModule
property var accountSensitiveSettings: Global.appIsReady? localAccountSensitiveSettings : null
readonly property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled
property var networks: networksModule.networks
2022-03-01 14:40:53 +00:00
2022-03-15 13:38:20 +00:00
function toggleTestNetworksEnabled(){
networksModule.toggleTestNetworksEnabled()
}
2022-03-01 14:40:53 +00:00
// TODO(alaibe): there should be no access to wallet section, create collectible in profile
property var overview: walletSectionOverview
property var flatCollectibles: Global.appIsReady ? walletSectionCollectibles.model : null
property var assets: walletSectionAssets.assets
property var accounts: Global.appIsReady? accountsModule.accounts : null
property var originModel: accountsModule.keyPairModel
property bool includeWatchOnlyAccount: accountsModule.includeWatchOnlyAccount
function toggleIncludeWatchOnlyAccount() {
accountsModule.toggleIncludeWatchOnlyAccount()
}
property string userProfilePublicKey: userProfile.pubKey
function deleteAccount(address) {
return accountsModule.deleteAccount(address)
}
function updateAccount(address, accountName, colorId, emoji) {
return accountsModule.updateAccount(address, accountName, colorId, emoji)
}
function updateAccountPosition(address, position) {
return accountsModule.updateAccountPosition(address, position)
}
function getAllNetworksSupportedPrefix() {
return networksModule.getAllNetworksSupportedPrefix()
}
function runAddAccountPopup() {
walletSection.runAddAccountPopup(false)
}
}