2024-01-29 18:02:59 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
|
|
|
import StatusQ 0.1
|
|
|
|
import StatusQ.Models 0.1
|
2023-07-17 23:56:40 +00:00
|
|
|
|
|
|
|
import utils 1.0
|
|
|
|
|
|
|
|
QtObject {
|
|
|
|
id: root
|
|
|
|
|
2024-01-17 20:19:58 +00:00
|
|
|
/* PRIVATE: Modules used to get data from backend */
|
|
|
|
readonly property var _allCollectiblesModule: !!walletSectionAllCollectibles ? walletSectionAllCollectibles : null
|
|
|
|
|
|
|
|
/* This list contains the complete list of collectibles with separate
|
|
|
|
entry per collectible which has a unique [network + contractAddress + tokenID] */
|
2024-01-29 18:02:59 +00:00
|
|
|
readonly property var _allCollectiblesModel: !!root._allCollectiblesModule ? root._allCollectiblesModule.allCollectiblesModel : null
|
|
|
|
|
|
|
|
readonly property var allCollectiblesModel: RolesRenamingModel {
|
|
|
|
sourceModel: root._allCollectiblesModel
|
|
|
|
|
|
|
|
mapping: [
|
|
|
|
RoleRename {
|
|
|
|
from: "uid"
|
|
|
|
to: "symbol"
|
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|
|
|
|
|
|
|
|
// custom controller used for sorting/filtering (w/o source model)
|
|
|
|
readonly property var manageCollectiblesController: ManageTokensController {
|
|
|
|
settingsKey: "WalletCollectibles"
|
|
|
|
}
|
2024-01-17 20:19:58 +00:00
|
|
|
|
|
|
|
/* The following are used to display the detailed view of a collectible */
|
2023-07-17 23:56:40 +00:00
|
|
|
readonly property var detailedCollectible: Global.appIsReady ? walletSection.collectibleDetailsController.detailedEntry : null
|
|
|
|
readonly property var detailedCollectibleStatus: Global.appIsReady ? walletSection.collectibleDetailsController.status : null
|
|
|
|
readonly property bool isDetailedCollectibleLoading: Global.appIsReady ? walletSection.collectibleDetailsController.isDetailedEntryLoading : true
|
|
|
|
|
|
|
|
function getDetailedCollectible(chainId, contractAddress, tokenId) {
|
|
|
|
walletSection.collectibleDetailsController.getDetailedCollectible(chainId, contractAddress, tokenId)
|
|
|
|
}
|
2023-10-23 11:36:33 +00:00
|
|
|
}
|