mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-20 11:45:50 +00:00
Wallet tutorial: more polish
This commit is contained in:
@@ -202,9 +202,7 @@ class SendXRPDialog(wx.Dialog):
|
||||
|
||||
def on_to_edit(self, event):
|
||||
"""
|
||||
When the user edits the "To" field, check that the address is well-
|
||||
formatted. If it's an X-address, fill in the destination tag and disable
|
||||
it.
|
||||
When the user edits the "To" field, check that the address is valid.
|
||||
"""
|
||||
v = self.txt_to.GetValue().strip()
|
||||
|
||||
@@ -565,9 +563,11 @@ class TWaXLFrame(wx.Frame):
|
||||
resp = dlg.ShowModal()
|
||||
if resp != wx.ID_OK:
|
||||
print("Send XRP canceled")
|
||||
dlg.Destroy()
|
||||
return
|
||||
|
||||
paydata = dlg.get_payment_data()
|
||||
dlg.Destroy()
|
||||
self.run_bg_job(self.worker.send_xrp(paydata))
|
||||
notif = wx.adv.NotificationMessage(title="Sending!", message =
|
||||
f"Sending a payment for {paydata['amt']} XRP!")
|
||||
|
||||
@@ -338,7 +338,12 @@ class SendXRPDialog(wx.Dialog):
|
||||
destination address.
|
||||
"""
|
||||
# Keep existing error message if there is one
|
||||
err_msg = self.err_to.GetToolTip().GetTip().strip()
|
||||
try:
|
||||
err_msg = self.err_to.GetToolTip().GetTip().strip()
|
||||
except RuntimeError:
|
||||
# This method can be called after the dialog it belongs to has been
|
||||
# closed. In that case, there's nothing to do here.
|
||||
return
|
||||
|
||||
if not dest_status["funded"]:
|
||||
err_msg = ("Warning: this account does not exist. The payment will "
|
||||
@@ -723,9 +728,11 @@ class TWaXLFrame(wx.Frame):
|
||||
resp = dlg.ShowModal()
|
||||
if resp != wx.ID_OK:
|
||||
print("Send XRP canceled")
|
||||
dlg.Destroy()
|
||||
return
|
||||
|
||||
paydata = dlg.get_payment_data()
|
||||
dlg.Destroy()
|
||||
self.run_bg_job(self.worker.send_xrp(paydata))
|
||||
notif = wx.adv.NotificationMessage(title="Sending!", message =
|
||||
f"Sending a payment for {paydata['amt']} XRP!")
|
||||
|
||||
Reference in New Issue
Block a user