fix: missing property in browser backend and path to provider.js

Fix #3827
This commit is contained in:
Richard Ramos 2021-10-25 16:29:36 -04:00 committed by r4bbit.eth
parent 14b49b800a
commit 7fe218fc85
2 changed files with 4 additions and 2 deletions

View File

@ -77,7 +77,7 @@ Rectangle {
userScripts: [
WebEngineScript {
injectionPoint: WebEngineScript.DocumentCreation
sourceUrl: Qt.resolvedUrl("/helpers/provider.js")
sourceUrl: Qt.resolvedUrl("./helpers/provider.js")
worldId: WebEngineScript.MainWorld // TODO: check https://doc.qt.io/qt-5/qml-qtwebengine-webenginescript.html#worldId-prop
}
]
@ -90,7 +90,7 @@ Rectangle {
userScripts: [
WebEngineScript {
injectionPoint: WebEngineScript.DocumentCreation
sourceUrl: Qt.resolvedUrl("/helpers/provider.js")
sourceUrl: Qt.resolvedUrl("./helpers/provider.js")
worldId: WebEngineScript.MainWorld // TODO: check https://doc.qt.io/qt-5/qml-qtwebengine-webenginescript.html#worldId-prop
}
]

View File

@ -12,6 +12,8 @@ QtObject {
signal web3Response(string data);
property int networkId: (Web3ProviderStore && Web3ProviderStore.networkId) || -1
function signValue(input){
if(Utils.isHex(input) && Utils.startsWith0x(input)){
return input