Skip to content

Commit

Permalink
inheritance value using EC built in editor and a notification a month…
Browse files Browse the repository at this point in the history
… before expiry
  • Loading branch information
KarolTrzeszczkowski committed Apr 12, 2019
1 parent 891b059 commit fffc0be
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion last-will-plugin/notification_service.py
Expand Up @@ -27,7 +27,7 @@ def __init__(self, parent):
hbox.addStretch(1)
vbox.addLayout(hbox)
self.notify_me = QCheckBox(
"Remind me about the next refreshing one week before the contract expiry date (1 mBCH)")
"Remind me about the next refreshing one month before the contract expiry date (1 mBCH)")
self.my_email = QLineEdit()
self.my_email.setPlaceholderText("My e-mail")
self.notify_inheritor = QCheckBox("Inform my inheritor about the will when I die (10 mBCH)")
Expand Down
16 changes: 8 additions & 8 deletions last-will-plugin/ui.py
Expand Up @@ -7,7 +7,7 @@
from electroncash.address import ScriptOutput
from electroncash.transaction import Transaction,TYPE_ADDRESS, TYPE_SCRIPT
import electroncash.web as web

from electroncash_gui.qt.amountedit import BTCAmountEdit
from electroncash.i18n import _
from electroncash_gui.qt.util import *
from electroncash.wallet import Multisig_Wallet
Expand Down Expand Up @@ -100,10 +100,12 @@ def start_manager(self):
priv = None
try:
public = self.wallet.get_public_keys(self.contract.addresses[self.role])
self.manager = LastWillContractManager(self.contractTx, self.contract, public, priv, self.role)
self.plugin.switch_to(Manage, self.wallet_name, self.password, self.manager)
except:
self.show_error("Wrong wallet.")
self.manager = LastWillContractManager(self.contractTx, self.contract, public, priv, self.role)
self.plugin.switch_to(Manage, self.wallet_name, self.password, self.manager)
self.plugin.switch_to(Intro,self.wallet_name,None,None)




Expand Down Expand Up @@ -154,16 +156,14 @@ def __init__(self, parent, plugin, wallet_name, password, manager):
l = QLabel(_("Inheritor address: "))
grid.addWidget(l, 0, 0)

l = QLabel(_("Value (sats)"))
l = QLabel(_("Value"))
grid.addWidget(l, 0, 1)

self.inheritor_address_wid = QLineEdit()
self.inheritor_address_wid.textEdited.connect(self.inheritance_info_changed)
grid.addWidget(self.inheritor_address_wid, 1, 0)

self.inheritance_value_wid = QLineEdit()
self.inheritance_value_wid.setMaximumWidth(100)
self.inheritance_value_wid.setAlignment(Qt.AlignRight)
self.inheritance_value_wid = BTCAmountEdit(self.main_window.get_decimal_point)
self.inheritance_value_wid.textEdited.connect(self.inheritance_info_changed)
grid.addWidget(self.inheritance_value_wid, 1, 1)
l = QLabel(_("My cold wallet address: "))
Expand All @@ -187,7 +187,7 @@ def inheritance_info_changed(self, ):
try:
self.inheritor_address = Address.from_string(self.inheritor_address_wid.text())
self.cold_address = Address.from_string(self.cold_address_wid.text())
self.value = int(self.inheritance_value_wid.text())
self.value = self.inheritance_value_wid.get_amount()
except:
self.create_button.setDisabled(True)
else:
Expand Down

0 comments on commit fffc0be

Please sign in to comment.