serinko %!s(int64=4) %!d(string=hai) anos
pai
achega
c4518c7b1d
Modificáronse 1 ficheiros con 3 adicións e 2 borrados
  1. 3 2
      whallets_cli.py

+ 3 - 2
whallets_cli.py

@@ -92,10 +92,11 @@ def save_wallet(ntw_i, new_wallet_dictionary):
     """Saves the wallet into the database/dictionary and informs the user"""
 
     dict = get_wallets()[ntw_i]
-    dict.update(new_wallet_dictionary)
+
     filename = 'wallets_dict.json'
     with open(filename) as f:
-        all_wallets = json.load(f)
+        f[dict].update(new_wallet_dictionary)
+        json.dump(f)