Changed function name and moved address_generator to backend dir

This commit is contained in:
shekhar-cis 2022-07-04 16:51:06 +05:30
parent 8a6c40b4dc
commit d0bf510651
Signed by untrusted user: shekhar-cis
GPG Key ID: F4F00AB04E83F9A7
2 changed files with 3 additions and 3 deletions

View File

@ -9,7 +9,7 @@ from bmconfigparser import BMConfigParser
class AddressGenerator: class AddressGenerator:
@staticmethod @staticmethod
def start_address_generation( def random_address_generation(
label, streamNumberForAddress=1, eighteenByteRipe=False, label, streamNumberForAddress=1, eighteenByteRipe=False,
nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000 nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000
): ):

View File

@ -7,7 +7,7 @@ from kivy.uix.boxlayout import BoxLayout
from kivymd.uix.behaviors.elevation import RectangularElevationBehavior from kivymd.uix.behaviors.elevation import RectangularElevationBehavior
from kivy.uix.screenmanager import Screen from kivy.uix.screenmanager import Screen
from kivy.app import App from kivy.app import App
from common_backend import AddressGenerator from backend.address_generator import AddressGenerator
# import state # import state
from bitmessagekivy.baseclass.common import toast 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() entered_label = str(self.ids.add_random_bx.children[0].ids.lab.text).strip()
if not entered_label: if not entered_label:
self.ids.add_random_bx.children[0].ids.lab.focus = True 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, entered_label, streamNumberForAddress=1, eighteenByteRipe=False,
nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000 nonceTrialsPerByte=1000, payloadLengthExtraBytes=1000
) )