Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -10,6 +10,10 @@ from wallet import get_wallet
|
|
10 |
config = Config('config.ini')
|
11 |
ocean = Ocean(config)
|
12 |
|
|
|
|
|
|
|
|
|
13 |
def wallet(private_key, did):
|
14 |
wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
15 |
address = wallet.address
|
@@ -53,16 +57,18 @@ article = (
|
|
53 |
|
54 |
|
55 |
interface = gr.Interface(
|
56 |
-
|
57 |
[
|
58 |
gr.inputs.Textbox(label="Private Key"),
|
59 |
gr.inputs.Textbox(placeholder="did:op:E2e123115d5758Dd4C6F434E1c142e72ed8B2820", label="Algorithm DID"),
|
60 |
],
|
61 |
[
|
62 |
-
gr.outputs.Textbox(label="Public Key"),
|
63 |
-
gr.outputs.Textbox(label="ETH balance"),
|
64 |
-
gr.outputs.Textbox(label="OCEAN balance"),
|
65 |
-
gr.outputs.Textbox(label="Algorithm token balance"),
|
|
|
|
|
66 |
],
|
67 |
title="Algorithm Web3 Wallet",
|
68 |
description=description,
|
|
|
10 |
config = Config('config.ini')
|
11 |
ocean = Ocean(config)
|
12 |
|
13 |
+
def w():
|
14 |
+
account, mnemonic = get_wallet()
|
15 |
+
return account, mnemonic
|
16 |
+
|
17 |
def wallet(private_key, did):
|
18 |
wallet = Wallet(ocean.web3, private_key, transaction_timeout=20, block_confirmations=config.block_confirmations)
|
19 |
address = wallet.address
|
|
|
57 |
|
58 |
|
59 |
interface = gr.Interface(
|
60 |
+
w,
|
61 |
[
|
62 |
gr.inputs.Textbox(label="Private Key"),
|
63 |
gr.inputs.Textbox(placeholder="did:op:E2e123115d5758Dd4C6F434E1c142e72ed8B2820", label="Algorithm DID"),
|
64 |
],
|
65 |
[
|
66 |
+
#gr.outputs.Textbox(label="Public Key"),
|
67 |
+
#gr.outputs.Textbox(label="ETH balance"),
|
68 |
+
#gr.outputs.Textbox(label="OCEAN balance"),
|
69 |
+
#gr.outputs.Textbox(label="Algorithm token balance"),
|
70 |
+
gr.outputs.Textbox(label="Account Address"),
|
71 |
+
gr.outputs.Textbox(label="Recovery Passphrase"),
|
72 |
],
|
73 |
title="Algorithm Web3 Wallet",
|
74 |
description=description,
|