From fe7e74459ed3cb7601087db3e16931f06ed36ad0 Mon Sep 17 00:00:00 2001 From: Anthony Laibe Date: Tue, 28 Sep 2021 21:18:41 +0200 Subject: [PATCH] feat: Add toggle network (#49) --- status/wallet2.nim | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/status/wallet2.nim b/status/wallet2.nim index 9d1476c..332862c 100644 --- a/status/wallet2.nim +++ b/status/wallet2.nim @@ -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)) \ No newline at end of file + self.events.emit("wallet2_cryptoServicesFetched", CryptoServicesArg(services: responseArray)) + +proc toggleNetwork*(self: StatusWalletController, network: Network) = + network.enabled = not network.enabled + status_network.upsertNetwork(network) \ No newline at end of file