fix(AddEditSavedAddressPopup): fix validating account

- `contactsModuleInst` was undefined due to a different RootStore
This commit is contained in:
Lukáš Tinkl 2024-09-25 19:02:35 +02:00 committed by Lukáš Tinkl
parent a0112f063e
commit d09448e406
3 changed files with 13 additions and 10 deletions

View File

@ -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 {

View File

@ -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

View File

@ -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: {