feat: Add toggle network (#49)

This commit is contained in:
Anthony Laibe 2021-09-28 21:18:41 +02:00 committed by GitHub
parent c07e04e976
commit fe7e74459e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 1 deletions

View File

@ -219,4 +219,8 @@ proc onAsyncFetchCryptoServices*(self: StatusWalletController, response: string)
self.events.emit("wallet2_cryptoServicesFetched", CryptoServicesArg())
return
self.events.emit("wallet2_cryptoServicesFetched", CryptoServicesArg(services: responseArray))
self.events.emit("wallet2_cryptoServicesFetched", CryptoServicesArg(services: responseArray))
proc toggleNetwork*(self: StatusWalletController, network: Network) =
network.enabled = not network.enabled
status_network.upsertNetwork(network)