1
0

qt send_tab: simplify method names.

when a method belongs to a class, there is no need to repeat the
class name in the method name.
This commit is contained in:
ThomasV
2023-03-19 10:44:33 +01:00
parent b07fe970bf
commit 4243b250b1

View File

@@ -488,7 +488,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
self.window.show_send_tab()
def read_invoice(self) -> Optional[Invoice]:
if self.check_send_tab_payto_line_and_show_errors():
if self.check_payto_line_and_show_errors():
return
try:
if not self._is_onchain:
@@ -506,7 +506,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
return invoice
else:
outputs = self.read_outputs()
if self.check_send_tab_onchain_outputs_and_show_errors(outputs):
if self.check_onchain_outputs_and_show_errors(outputs):
return
message = self.message_e.text()
return self.wallet.create_invoice(
@@ -601,7 +601,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
outputs = self.payto_e.get_outputs(self.max_button.isChecked())
return outputs
def check_send_tab_onchain_outputs_and_show_errors(self, outputs: List[PartialTxOutput]) -> bool:
def check_onchain_outputs_and_show_errors(self, outputs: List[PartialTxOutput]) -> bool:
"""Returns whether there are errors with outputs.
Also shows error dialog to user if so.
"""
@@ -619,7 +619,7 @@ class SendTab(QWidget, MessageBoxMixin, Logger):
return False # no errors
def check_send_tab_payto_line_and_show_errors(self) -> bool:
def check_payto_line_and_show_errors(self) -> bool:
"""Returns whether there are errors.
Also shows error dialog to user if so.
"""