2024-05-01 16:15:42 +00:00
|
|
|
import QtQuick 2.15
|
|
|
|
|
2024-05-31 09:58:47 +00:00
|
|
|
import StatusQ.Core.Utils 0.1
|
|
|
|
|
|
|
|
QObject {
|
2024-05-21 10:42:50 +00:00
|
|
|
id: root
|
|
|
|
|
|
|
|
required property var controller
|
|
|
|
|
|
|
|
/// \c dappsJson serialized from status-go.wallet.GetDapps
|
|
|
|
signal dappsListReceived(string dappsJson)
|
2024-05-20 18:42:31 +00:00
|
|
|
|
|
|
|
function addWalletConnectSession(sessionJson) {
|
2024-05-21 10:42:50 +00:00
|
|
|
controller.addWalletConnectSession(sessionJson)
|
|
|
|
}
|
|
|
|
|
|
|
|
/// \c getDapps triggers an async response to \c dappsListReceived
|
|
|
|
function getDapps() {
|
|
|
|
return controller.getDapps()
|
|
|
|
}
|
|
|
|
|
|
|
|
// Handle async response from controller
|
2024-05-31 09:58:47 +00:00
|
|
|
Connections {
|
2024-05-21 10:42:50 +00:00
|
|
|
target: controller
|
|
|
|
|
|
|
|
function onDappsListReceived(dappsJson) {
|
|
|
|
root.dappsListReceived(dappsJson)
|
|
|
|
}
|
2024-05-20 18:42:31 +00:00
|
|
|
}
|
|
|
|
}
|