Spaces:
Runtime error
Runtime error
Commit
·
f9dc111
1
Parent(s):
4ca6244
check input type
Browse files
app.py
CHANGED
|
@@ -10,11 +10,15 @@ from wallet import get_wallet
|
|
| 10 |
config = Config('config.ini')
|
| 11 |
ocean = Ocean(config)
|
| 12 |
|
| 13 |
-
def wallet(
|
| 14 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 15 |
|
| 16 |
-
private_key = account.key.hex()
|
| 17 |
-
address = account.address
|
| 18 |
|
| 19 |
wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
| 20 |
|
|
@@ -23,7 +27,7 @@ def wallet(hello):
|
|
| 23 |
eth_balance = from_wei(ocean.web3.eth.get_balance(address))
|
| 24 |
ocean_balance = from_wei(OCEAN_token.balanceOf(address))
|
| 25 |
|
| 26 |
-
return
|
| 27 |
|
| 28 |
# def wallet(private_key, did):
|
| 29 |
# wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
|
|
|
| 10 |
config = Config('config.ini')
|
| 11 |
ocean = Ocean(config)
|
| 12 |
|
| 13 |
+
def wallet(private_key):
|
| 14 |
+
|
| 15 |
+
# if private_key == "":
|
| 16 |
+
# account, mnemonic = get_wallet()
|
| 17 |
+
|
| 18 |
+
# private_key = account.key.hex()
|
| 19 |
+
# address = account.address
|
| 20 |
+
|
| 21 |
|
|
|
|
|
|
|
| 22 |
|
| 23 |
wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
| 24 |
|
|
|
|
| 27 |
eth_balance = from_wei(ocean.web3.eth.get_balance(address))
|
| 28 |
ocean_balance = from_wei(OCEAN_token.balanceOf(address))
|
| 29 |
|
| 30 |
+
return type(private_key), private_key, eth_balance, ocean_balance
|
| 31 |
|
| 32 |
# def wallet(private_key, did):
|
| 33 |
# wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|