fix(dapps) restore loading of Wallet Connect SDK

Reverts changes introduced by 6eeb91 the connector integration
that were loading the SDK asynchronously. Not sure why it isn't working
though.

Closes: #15694
This commit is contained in:
Stefan 2024-07-22 11:31:42 +03:00 committed by Stefan Dunca
parent 798ad6d4b3
commit b02d0d4b1c
1 changed files with 6 additions and 25 deletions

View File

@ -2046,15 +2046,6 @@ Item {
} }
} }
Component {
id: walletConnectSDK
WalletConnectSDK {
active: WalletStore.RootStore.walletSectionInst.walletReady
projectId: WalletStore.RootStore.appSettings.walletConnectProjectID
}
}
Component { Component {
id: dappsConnectorSDK id: dappsConnectorSDK
@ -2066,36 +2057,26 @@ Item {
} }
} }
Loader {
id: walletConnectSDKLoader
active: Global.featureFlags.dappsEnabled
sourceComponent: walletConnectSDK
}
Loader { Loader {
id: dappsConnectorSDKLoader id: dappsConnectorSDKLoader
active: Global.featureFlags.connectorEnabled active: Global.featureFlags.connectorEnabled
sourceComponent: dappsConnectorSDK sourceComponent: dappsConnectorSDK
} }
Loader {
id: sdkLoader
onLoaded: {
walletConnectSDKLoader.active = Global.featureFlags.dappsEnabled
dappsConnectorSDKLoader.active = Global.featureFlags.connectorEnabled
}
}
Loader { Loader {
id: walletConnectServiceLoader id: walletConnectServiceLoader
// It seems some of the functionality of the dapp connector depends on the WalletConnectService
active: Global.featureFlags.dappsEnabled || Global.featureFlags.connectorEnabled active: Global.featureFlags.dappsEnabled || Global.featureFlags.connectorEnabled
sourceComponent: WalletConnectService { sourceComponent: WalletConnectService {
id: walletConnectService id: walletConnectService
wcSDK: sdkLoader.item wcSDK: WalletConnectSDK {
active: WalletStore.RootStore.walletSectionInst.walletReady
projectId: WalletStore.RootStore.appSettings.walletConnectProjectID
}
store: DAppsStore { store: DAppsStore {
controller: WalletStore.RootStore.walletConnectController controller: WalletStore.RootStore.walletConnectController
} }