2022-02-11 09:44:49 +00:00
|
|
|
import QtQuick 2.13
|
|
|
|
|
2023-02-14 09:20:53 +00:00
|
|
|
import utils 1.0
|
2022-04-01 10:30:55 +00:00
|
|
|
|
2022-02-11 09:44:49 +00:00
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2023-04-17 11:36:40 +00:00
|
|
|
property var accountsModule
|
|
|
|
property var networksModule
|
|
|
|
|
2023-02-14 09:20:53 +00:00
|
|
|
property var accountSensitiveSettings: Global.appIsReady? localAccountSensitiveSettings : null
|
2022-03-09 14:24:46 +00:00
|
|
|
|
2023-06-15 00:06:10 +00:00
|
|
|
readonly property bool areTestNetworksEnabled: networksModule.areTestNetworksEnabled
|
2023-07-11 15:10:26 +00:00
|
|
|
readonly property var combinedNetworks: networksModule.combinedNetworks
|
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
|
|
|
|
2023-04-17 11:36:40 +00:00
|
|
|
// TODO(alaibe): there should be no access to wallet section, create collectible in profile
|
2023-04-25 16:54:50 +00:00
|
|
|
property var overview: walletSectionOverview
|
2023-03-20 12:29:05 +00:00
|
|
|
property var flatCollectibles: Global.appIsReady ? walletSectionCollectibles.model : null
|
2023-06-15 00:06:10 +00:00
|
|
|
property var assets: walletSectionAssets.assets
|
2023-04-17 11:36:40 +00:00
|
|
|
property var accounts: Global.appIsReady? accountsModule.accounts : null
|
2023-06-22 10:32:43 +00:00
|
|
|
property var originModel: accountsModule.keyPairModel
|
2023-06-26 15:57:16 +00:00
|
|
|
property bool includeWatchOnlyAccount: accountsModule.includeWatchOnlyAccount
|
|
|
|
|
|
|
|
function toggleIncludeWatchOnlyAccount() {
|
|
|
|
accountsModule.toggleIncludeWatchOnlyAccount()
|
|
|
|
}
|
2023-06-22 10:32:43 +00:00
|
|
|
|
|
|
|
property string userProfilePublicKey: userProfile.pubKey
|
2023-01-18 09:25:36 +00:00
|
|
|
|
2023-05-04 14:34:00 +00:00
|
|
|
function deleteAccount(address) {
|
|
|
|
return accountsModule.deleteAccount(address)
|
2022-03-07 09:33:38 +00:00
|
|
|
}
|
2022-03-04 09:09:58 +00:00
|
|
|
|
2023-05-22 15:55:47 +00:00
|
|
|
function updateAccount(address, accountName, colorId, emoji) {
|
|
|
|
return accountsModule.updateAccount(address, accountName, colorId, emoji)
|
2022-03-10 17:01:17 +00:00
|
|
|
}
|
|
|
|
|
2023-07-18 14:25:42 +00:00
|
|
|
function moveAccount(from, to) {
|
|
|
|
root.accountsModule.moveAccount(from, to)
|
|
|
|
}
|
|
|
|
|
|
|
|
function moveAccountFinally(from, to) {
|
|
|
|
root.accountsModule.moveAccountFinally(from, to)
|
2023-06-20 11:59:15 +00:00
|
|
|
}
|
|
|
|
|
2023-06-22 10:32:43 +00:00
|
|
|
function getAllNetworksSupportedPrefix() {
|
|
|
|
return networksModule.getAllNetworksSupportedPrefix()
|
|
|
|
}
|
2023-06-27 07:13:55 +00:00
|
|
|
|
|
|
|
function runAddAccountPopup() {
|
|
|
|
walletSection.runAddAccountPopup(false)
|
|
|
|
}
|
2023-07-11 15:10:26 +00:00
|
|
|
|
|
|
|
function evaluateRpcEndPoint(url) {
|
2023-07-12 05:58:33 +00:00
|
|
|
return networksModule.fetchChainIdForUrl(url)
|
2023-07-11 15:10:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
function updateNetworkEndPointValues(chainId, newMainRpcInput, newFailoverRpcUrl) {
|
|
|
|
networksModule.updateNetworkEndPointValues(chainId, newMainRpcInput, newFailoverRpcUrl)
|
|
|
|
}
|
2022-03-02 14:24:39 +00:00
|
|
|
}
|