From d0bf5106517cd5eb8ba3ee49f3b37c307b082aac Mon Sep 17 00:00:00 2001 From: shekhar-cis Date: Mon, 4 Jul 2022 16:51:06 +0530 Subject: [PATCH] Changed function name and moved address_generator to backend dir --- src/{common_backend.py => backend/address_generator.py} | 2 +- src/bitmessagekivy/baseclass/login.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) rename src/{common_backend.py => backend/address_generator.py} (97%) diff --git a/src/common_backend.py b/src/backend/address_generator.py similarity index 97% rename from src/common_backend.py rename to src/backend/address_generator.py index dab14a43..2db93d2f 100644 --- a/src/common_backend.py +++ b/src/backend/address_generator.py @@ -9,7 +9,7 @@ from bmconfigparser import BMConfigParser class AddressGenerator: @staticmethod - def start_address_generation( + def random_address_generation( label, streamNumberForAddress=1, eighteenByteRipe=False, nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000 ): diff --git a/src/bitmessagekivy/baseclass/login.py b/src/bitmessagekivy/baseclass/login.py index a1b43723..74ba9def 100644 --- a/src/bitmessagekivy/baseclass/login.py +++ b/src/bitmessagekivy/baseclass/login.py @@ -7,7 +7,7 @@ from kivy.uix.boxlayout import BoxLayout from kivymd.uix.behaviors.elevation import RectangularElevationBehavior from kivy.uix.screenmanager import Screen from kivy.app import App -from common_backend import AddressGenerator +from backend.address_generator import AddressGenerator # import state from bitmessagekivy.baseclass.common import toast @@ -43,7 +43,7 @@ class Random(Screen): entered_label = str(self.ids.add_random_bx.children[0].ids.lab.text).strip() if not entered_label: self.ids.add_random_bx.children[0].ids.lab.focus = True - is_address = AddressGenerator.start_address_generation( + is_address = AddressGenerator.random_address_generation( entered_label, streamNumberForAddress=1, eighteenByteRipe=False, nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000 )