2024-04-10 22:56:10 +02:00
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
// WalletConnect POC - to remove this file
|
|
|
|
/////////////////////////////////////////////////////
|
|
|
|
|
2023-10-03 18:43:35 +03:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
2023-11-15 23:26:12 +02:00
|
|
|
import AppLayouts.Wallet.stores 1.0 as WalletStores
|
2023-10-03 18:43:35 +03:00
|
|
|
|
2024-04-10 22:56:10 +02:00
|
|
|
import shared.popups.walletconnect 1.0
|
|
|
|
|
2023-10-03 18:43:35 +03:00
|
|
|
Item {
|
|
|
|
id: root
|
|
|
|
|
2023-10-27 19:18:24 +03:00
|
|
|
required property var controller
|
2023-10-03 18:43:35 +03:00
|
|
|
|
2023-11-15 23:26:12 +02:00
|
|
|
property alias modal: modal
|
|
|
|
property alias sdk: sdk
|
|
|
|
property alias url: sdk.url
|
2023-11-06 21:05:18 +02:00
|
|
|
|
2024-04-10 22:56:10 +02:00
|
|
|
POCWalletConnectModal {
|
2023-11-15 23:26:12 +02:00
|
|
|
id: modal
|
2023-11-06 21:05:18 +02:00
|
|
|
|
2023-11-15 23:26:12 +02:00
|
|
|
controller: root.controller
|
|
|
|
sdk: sdk
|
2023-11-18 18:06:04 +02:00
|
|
|
}
|
2023-10-03 18:43:35 +03:00
|
|
|
|
2023-11-18 18:06:04 +02:00
|
|
|
WalletConnectSDK {
|
2023-11-15 23:26:12 +02:00
|
|
|
id: sdk
|
2023-10-03 18:43:35 +03:00
|
|
|
|
2023-11-06 21:05:18 +02:00
|
|
|
projectId: controller.projectId
|
|
|
|
|
2023-11-15 23:26:12 +02:00
|
|
|
active: WalletStores.RootStore.walletSectionInst.walletReady && (controller.hasActivePairings || modal.opened)
|
2023-11-06 21:05:18 +02:00
|
|
|
|
2023-11-15 23:26:12 +02:00
|
|
|
onSessionRequestEvent: (details) => {
|
|
|
|
modal.openWithSessionRequestEvent(details)
|
2023-11-06 21:05:18 +02:00
|
|
|
}
|
|
|
|
}
|
2023-12-01 22:43:21 +03:00
|
|
|
|
|
|
|
Connections {
|
|
|
|
target: root.controller
|
|
|
|
function onRequestOpenWalletConnectPopup(uri) {
|
|
|
|
modal.openWithUri(uri)
|
|
|
|
}
|
|
|
|
}
|
2023-10-03 18:43:35 +03:00
|
|
|
}
|