status-desktop/ui/imports/shared/stores/DAppsStore.qml

30 lines
685 B
QML
Raw Normal View History

import QtQuick 2.15
import StatusQ.Core.Utils 0.1
QObject {
id: root
required property var controller
/// \c dappsJson serialized from status-go.wallet.GetDapps
signal dappsListReceived(string dappsJson)
function addWalletConnectSession(sessionJson) {
controller.addWalletConnectSession(sessionJson)
}
/// \c getDapps triggers an async response to \c dappsListReceived
function getDapps() {
return controller.getDapps()
}
// Handle async response from controller
Connections {
target: controller
function onDappsListReceived(dappsJson) {
root.dappsListReceived(dappsJson)
}
}
}