diff --git a/storybook/pages/AddEditSavedAddressPopupPage.qml b/storybook/pages/AddEditSavedAddressPopupPage.qml index c5b331166f..75f20ec8ef 100644 --- a/storybook/pages/AddEditSavedAddressPopupPage.qml +++ b/storybook/pages/AddEditSavedAddressPopupPage.qml @@ -12,6 +12,7 @@ import AppLayouts.Wallet.popups 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStores import utils 1.0 +import shared.stores 1.0 as SharedStores SplitView { orientation: Qt.Horizontal @@ -52,6 +53,7 @@ SplitView { } store: WalletStores.RootStore + sharedRootStore: SharedStores.RootStore {} // Emulate resolving ENS by simple validation QtObject { diff --git a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml index 07bab9324b..d7b3ad4655 100644 --- a/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml +++ b/ui/app/AppLayouts/Wallet/popups/AddEditSavedAddressPopup.qml @@ -7,6 +7,7 @@ import QtQuick.Layouts 1.15 import utils 1.0 import shared.controls 1.0 import shared.panels 1.0 +import shared.stores 1.0 as SharedStores import StatusQ 0.1 import StatusQ.Components 0.1 @@ -28,17 +29,18 @@ import ".." StatusModal { id: root + required property WalletStores.RootStore store + required property SharedStores.RootStore sharedRootStore + property var flatNetworks closePolicy: Popup.CloseOnEscape | Popup.CloseOnPressOutside width: 477 - headerSettings.title: d.editMode? qsTr("Edit saved addres") : qsTr("Add new saved address") + headerSettings.title: d.editMode? qsTr("Edit saved address") : qsTr("Add new saved address") headerSettings.subTitle: d.editMode? d.name : "" - property WalletStores.RootStore store - function initWithParams(params = {}) { d.storedName = params.name?? "" d.storedColorId = params.colorId?? "" @@ -180,7 +182,7 @@ StatusModal { mainModule.resolveENS(name, d.uuid) }); - property var contactsModuleInst: root.store.profileSectionModuleInst.contactsModule + property var contactsModuleInst: root.sharedRootStore.profileSectionModuleInst.contactsModule /// Ensures that the \c root.address and \c root.chainShortNames are not reset when the initial text is set property bool initialized: false @@ -559,7 +561,7 @@ StatusModal { let unknownPrefixes = prefixes.filter(e => { for (let i = 0; i < networksCount; i++) { if (e == StatusQUtils.ModelUtils.get(root.flatNetworks, i).shortName) - return false + return false } return true }) diff --git a/ui/app/mainui/AppMain.qml b/ui/app/mainui/AppMain.qml index 6bd0e31adb..b796d4b238 100644 --- a/ui/app/mainui/AppMain.qml +++ b/ui/app/mainui/AppMain.qml @@ -38,7 +38,7 @@ import StatusQ.Layout 0.1 import StatusQ.Popups 0.1 import StatusQ.Popups.Dialog 0.1 -import AppLayouts.stores 1.0 +import AppLayouts.stores 1.0 as AppStores import AppLayouts.Chat.stores 1.0 as ChatStores import AppLayouts.Communities.stores 1.0 import AppLayouts.Wallet.stores 1.0 as WalletStores @@ -55,7 +55,7 @@ Item { id: appMain property alias appLayout: appLayout - property RootStore rootStore: RootStore { + property AppStores.RootStore rootStore: AppStores.RootStore { profileSectionStore.sendModalPopup: sendModal } property ChatStores.RootStore rootChatStore: ChatStores.RootStore { @@ -81,7 +81,7 @@ Item { } readonly property WalletStores.BuyCryptoStore buyCryptoStore: WalletStores.BuyCryptoStore {} - readonly property FeatureFlagsStore featureFlagsStore: FeatureFlagsStore { + readonly property AppStores.FeatureFlagsStore featureFlagsStore: AppStores.FeatureFlagsStore { readonly property var featureFlags: typeof featureFlagsRootContextProperty !== undefined ? featureFlagsRootContextProperty : null connectorEnabled: featureFlags ? featureFlags.connectorEnabled : false @@ -628,7 +628,6 @@ Item { id: statusStickersPopupLoader active: appMain.rootStore.mainModuleInst.sectionsLoaded sourceComponent: StatusStickersPopup { - id: statusStickersPopup store: appMain.rootChatStore transactionStore: appMain.transactionStore walletAssetsStore: appMain.walletAssetsStore @@ -1863,7 +1862,7 @@ Item { sourceComponent: WalletPopups.AddEditSavedAddressPopup { store: WalletStores.RootStore - + sharedRootStore: RootStore flatNetworks: WalletStores.RootStore.filteredFlatModel onClosed: {