fix: review
This commit is contained in:
parent
1989ad7971
commit
f9b08abd72
|
@ -35,9 +35,9 @@ method delete*(self: Module) =
|
|||
|
||||
method load*(self: Module) =
|
||||
singletonInstance.engine.setRootContextProperty("providerModule", self.viewVariant)
|
||||
self.view.load()
|
||||
self.view.dappsAddress = self.controller.getDappsAddress()
|
||||
self.view.networkId = self.controller.getCurrentNetworkDetails().config.networkId
|
||||
self.view.load()
|
||||
|
||||
method isLoaded*(self: Module): bool =
|
||||
return self.moduleLoaded
|
||||
|
|
|
@ -46,7 +46,7 @@ QtObject:
|
|||
proc networkId*(self: View): int {.slot.} =
|
||||
result = self.networkId
|
||||
|
||||
QtProperty[string] networkId:
|
||||
QtProperty[int] networkId:
|
||||
read = networkId
|
||||
notify = networkIdChanged
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@ method clearPermissions*(self: Service, dapp: string): bool =
|
|||
|
||||
method revoke*(self: Service, permission: Permission): bool =
|
||||
try:
|
||||
var dappsToDelete: seq[string] = @[]
|
||||
for dapp in self.dapps.mvalues:
|
||||
if dapp.permissions.contains(permission):
|
||||
dapp.permissions.excl(permission)
|
||||
|
@ -62,7 +63,9 @@ method revoke*(self: Service, permission: Permission): bool =
|
|||
discard status_go.addDappPermissions(dapp.name, dapp.permissions.toSeq().mapIt($it))
|
||||
else:
|
||||
discard status_go.deleteDappPermissions(dapp.name)
|
||||
self.dapps.del(dapp.name)
|
||||
dappsToDelete.add(dapp.name)
|
||||
for dappName in dappsToDelete:
|
||||
self.dapps.del(dappName)
|
||||
return true
|
||||
except Exception as e:
|
||||
let errDescription = e.msg
|
||||
|
|
|
@ -8,6 +8,8 @@ QtObject {
|
|||
property var web3ProviderInst: providerModule
|
||||
property var urlENSDictionary: ({})
|
||||
|
||||
property int networkId: providerModule.networkId
|
||||
|
||||
function determineRealURL(text){
|
||||
var url = RootStore.getUrlFromUserInput(text);
|
||||
var host = providerModule.getHost(url);
|
||||
|
|
Loading…
Reference in New Issue