serinko пре 4 година
родитељ
комит
bc4d17cefb
4 измењених фајлова са 39 додато и 49 уклоњено
  1. 30 11
      README.md
  2. BIN
      __pycache__/texts_cli.cpython-38.pyc
  3. 1 30
      wallets_dict.json
  4. 8 8
      whallets_cli.py

+ 30 - 11
README.md

@@ -27,19 +27,38 @@ The wallet dictionary is used to store all the information according to this tem
 This is a simple template to make a database dictionary. Fill all \<*strings*\> with real data.
 
 ```python
-#defi wallets:
+
 {
-	'@<name>':{
-		'twitter':'<full_twitter_address>',
-		'note':'<key info about the wallet owner>',  
-		'ens':'<name.eth>',
-		'wallets':{
-			'erc':'<eth_wallet_address>',
-			'<any_other_chain>':'<corresponding_address>'
-	
-		},
-	},
+        "<template_name_wallet>": {
+            "twitter": "<https://twitter.com/full_address>",
+            "info": "<info>",
+            "ens": "<...> ",
+            "wallets": {
+                "wallet_0": {
+                    "address": "<paste 0x... address>",
+                    "networks": [
+                        "erc",
+                        "<paste all the networks separated by a comma>"
+
+                    ]
+                },
+                "<wallet_1: in case another wallet of the same user>": {
+                    "address": "<0x...>",
+                    "networks": [
+                        "<...>",
+                        "<...>"
+                    ]
+                },
+                "<wallet_2: in case of another wallet of the same user>": {
+                    "address": "<0x...>",
+                    "networks": [
+                        "<..>"
+                    ]
+                }
+            }
+        }
 }
+
 ```
 
 

BIN
__pycache__/texts_cli.cpython-38.pyc


+ 1 - 30
wallets_dict.json

@@ -483,37 +483,8 @@
                     ]
                 }
             }
-        },
-
-
-        "<template_name_wallet>": {
-            "twitter": "https://twitter.com/<full_address>",
-            "info": "<info>",
-            "ens": " ",
-            "wallets": {
-                "wallet_0": {
-                    "address": "<paste 0x... address>",
-                    "networks": [
-                        "erc",
-                        "<paste all the networks>"
-
-                    ]
-                },
-                "<wallet_1: in case another wallet of the same user>": {
-                    "address": "<0x...>",
-                    "networks": [
-                        "<...>",
-                        "<...>"
-                    ]
-                },
-                "<wallet_2: in case of another wallet of the same user>": {
-                    "address": "<0x...>",
-                    "networks": [
-                        "<..>"
-                    ]
-                }
-            }
         }
+
     },
     "spl_wallets":
     {

+ 8 - 8
whallets_cli.py

@@ -97,14 +97,14 @@ def save_wallet(ntw_i, new_wallet_dictionary):
         all_wallets = json.load(f)
 
 
-        dict_0 = all_wallets['evm_wallets']
-        dict_1 = all_wallets['spl_wallets']
-        dicts = [dict_0,dict_1]
-        dict = dicts[ntw_i]
+    dict_0 = all_wallets['evm_wallets']
+    dict_1 = all_wallets['spl_wallets']
+    dicts = [dict_0,dict_1]
+    dict = dicts[ntw_i]
 
-        dict.update(new_wallet_dictionary)
-        with open(filename, 'w') as f:
-            json.dump(all_wallets,f)
+    dict.update(new_wallet_dictionary)
+    with open(filename, 'w') as f:
+        json.dump(all_wallets,f, indent=4)
 
 
 
@@ -133,7 +133,7 @@ def refactor_wallet(addresses, new_wallet):
             }
         }
         new_wallet_dictionary[username]["wallets"].update(wallet)
-    print(f"\n\n\n{new_wallet_dictionary}")
+    # print(f"\n\n\n{new_wallet_dictionary}")
 
     return new_wallet_dictionary