Skip to content

Commit

Permalink
Reverting encode_qr.py file move and name change
Browse files Browse the repository at this point in the history
  • Loading branch information
kdmukai committed Mar 3, 2024
1 parent 03a0e8a commit 98e9ca8
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 13 deletions.
2 changes: 1 addition & 1 deletion src/seedsigner/gui/screens/screen.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
from seedsigner.gui.keyboard import Keyboard, TextEntryDisplay
from seedsigner.gui.renderer import Renderer
from seedsigner.hardware.buttons import HardwareButtonsConstants, HardwareButtons
from seedsigner.helpers.qr_encoders import BaseQrEncoder
from seedsigner.models.encode_qr import BaseQrEncoder
from seedsigner.models.settings import SettingsConstants
from seedsigner.models.threads import BaseThread, ThreadsafeCounter

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from embit import bip32
from embit.networks import NETWORKS
from binascii import b2a_base64, hexlify
from binascii import hexlify
from dataclasses import dataclass
from typing import List
from embit import bip32
Expand All @@ -11,7 +11,6 @@
from seedsigner.helpers.ur2.ur_encoder import UREncoder
from seedsigner.helpers.ur2.ur import UR
from seedsigner.helpers.qr import QR
from seedsigner.models.qr_type import QRType
from seedsigner.models.seed import Seed
from seedsigner.models.settings import SettingsConstants

Expand All @@ -26,7 +25,6 @@ class BaseQrEncoder:


def __post_init__(self):
print("BaseQrEncoder.__post_init__")
self.qr = QR()


Expand Down Expand Up @@ -162,7 +160,6 @@ class BaseXpubQrEncoder(BaseQrEncoder):
wordlist_language_code: str = SettingsConstants.WORDLIST_LANGUAGE__ENGLISH

def prep_xpub(self):
print("BaseXpubQrEncoder.prep_xpub")
self.wordlist = Seed.get_wordlist(self.wordlist_language_code)

if self.wordlist == None:
Expand Down Expand Up @@ -292,7 +289,6 @@ def _create_parts(self):
class BaseFountainQrEncoder(BaseQrEncoder):
def __post_init__(self):
super().__post_init__()
print("BaseFountainQrEncoder __post_init__")

self.ur2_encode: UREncoder = None

Expand Down Expand Up @@ -338,8 +334,6 @@ def restart(self):
class UrXpubQrEncoder(BaseFountainQrEncoder, BaseXpubQrEncoder):
def __post_init__(self):
super().__post_init__()
print("UrXpubQrEncoder __post_init__")

self.prep_xpub()

def derivation_to_keypath(path: str) -> list:
Expand Down
2 changes: 1 addition & 1 deletion src/seedsigner/views/psbt_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from seedsigner.controller import Controller

from seedsigner.gui.components import FontAwesomeIconConstants, SeedSignerIconConstants
from seedsigner.helpers.qr_encoders import UrPsbtQrEncoder
from seedsigner.models.encode_qr import UrPsbtQrEncoder
from seedsigner.models.psbt_parser import PSBTParser
from seedsigner.models.settings import SettingsConstants
from seedsigner.gui.screens.psbt_screens import PSBTOverviewScreen, PSBTMathScreen, PSBTAddressDetailsScreen, PSBTChangeDetailsScreen, PSBTFinalizeScreen
Expand Down
2 changes: 1 addition & 1 deletion src/seedsigner/views/seed_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
from seedsigner.gui.screens.screen import LargeIconStatusScreen, QRDisplayScreen
from seedsigner.helpers import embit_utils
from seedsigner.models.decode_qr import DecodeQR
from seedsigner.helpers.qr_encoders import CompactSeedQrEncoder, GenericStaticQrEncoder, SeedQrEncoder, SpecterXPubQrEncoder, StaticXpubQrEncoder, UrXpubQrEncoder
from seedsigner.models.encode_qr import CompactSeedQrEncoder, GenericStaticQrEncoder, SeedQrEncoder, SpecterXPubQrEncoder, StaticXpubQrEncoder, UrXpubQrEncoder
from seedsigner.models.psbt_parser import PSBTParser
from seedsigner.models.qr_type import QRType
from seedsigner.models.seed import InvalidSeedException, Seed
Expand Down
2 changes: 1 addition & 1 deletion src/seedsigner/views/tools_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
ToolsCalcFinalWordScreen, ToolsCoinFlipEntryScreen, ToolsDiceEntropyEntryScreen, ToolsImageEntropyFinalImageScreen,
ToolsImageEntropyLivePreviewScreen, ToolsAddressExplorerAddressTypeScreen)
from seedsigner.helpers import embit_utils, mnemonic_generation
from seedsigner.helpers.qr_encoders import GenericStaticQrEncoder
from seedsigner.models.encode_qr import GenericStaticQrEncoder
from seedsigner.models.seed import Seed
from seedsigner.models.settings_definition import SettingsConstants
from seedsigner.views.seed_views import SeedDiscardView, SeedFinalizeView, SeedMnemonicEntryView, SeedOptionsView, SeedWordsWarningView, SeedExportXpubScriptTypeView
Expand Down
2 changes: 1 addition & 1 deletion tests/test_encodepsbtqr.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from seedsigner.helpers.qr_encoders import CompactSeedQrEncoder, SeedQrEncoder, SpecterXPubQrEncoder, StaticXpubQrEncoder, UrPsbtQrEncoder, UrXpubQrEncoder
from seedsigner.models.encode_qr import CompactSeedQrEncoder, SeedQrEncoder, SpecterXPubQrEncoder, StaticXpubQrEncoder, UrPsbtQrEncoder, UrXpubQrEncoder
from embit import psbt
from binascii import a2b_base64

Expand Down
2 changes: 1 addition & 1 deletion tests/test_seedqr.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
from embit import bip39
from seedsigner.helpers.qr import QR
from seedsigner.models.decode_qr import DecodeQR, DecodeQRStatus
from seedsigner.helpers.qr_encoders import SeedQrEncoder, CompactSeedQrEncoder
from seedsigner.models.encode_qr import SeedQrEncoder, CompactSeedQrEncoder
from seedsigner.models.qr_type import QRType


Expand Down

0 comments on commit 98e9ca8

Please sign in to comment.