Skip to content

Commit

Permalink
Merge pull request LedgerHQ#4 from coderofstuff/boilerplate-cleanups
Browse files Browse the repository at this point in the history
Boilerplate cleanups
  • Loading branch information
coderofstuff authored Apr 17, 2023
2 parents dd34839 + b170ac9 commit 59fe570
Show file tree
Hide file tree
Showing 11 changed files with 14 additions and 14 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ APP_LOAD_PARAMS += --appFlags 0x200 # APPLICATION_FLAG_BOLOS_SETTINGS
else
APP_LOAD_PARAMS += --appFlags 0x000
endif
APP_LOAD_PARAMS += --path "44'"
APP_LOAD_PARAMS += --path "44'/111111'"
APP_LOAD_PARAMS += $(COMMON_LOAD_PARAMS)

APPNAME = "Kaspa"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from io import BytesIO
from typing import Union

from .boilerplate_utils import read, read_uint, read_varint, write_varint, UINT64_MAX
from .kaspa_utils import read, read_uint, read_varint, write_varint, UINT64_MAX


class TransactionError(Exception):
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions tests/test_appname_cmd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from application_client.boilerplate_command_sender import KaspaCommandSender
from application_client.boilerplate_response_unpacker import unpack_get_app_name_response
from application_client.kaspa_command_sender import KaspaCommandSender
from application_client.kaspa_response_unpacker import unpack_get_app_name_response


# In this test we check that the GET_APP_NAME replies the application name
Expand Down
2 changes: 1 addition & 1 deletion tests/test_error_cmd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from ragger.backend import RaisePolicy
from application_client.boilerplate_command_sender import CLA, InsType, P1, P2, Errors
from application_client.kaspa_command_sender import CLA, InsType, P1, P2, Errors


# Ensure the app returns an error when a bad CLA is used
Expand Down
4 changes: 2 additions & 2 deletions tests/test_name_version.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from application_client.boilerplate_command_sender import KaspaCommandSender
from application_client.boilerplate_response_unpacker import unpack_get_app_and_version_response
from application_client.kaspa_command_sender import KaspaCommandSender
from application_client.kaspa_response_unpacker import unpack_get_app_and_version_response


# Test a specific APDU asking BOLOS (and not the app) the name and version of the current app
Expand Down
4 changes: 2 additions & 2 deletions tests/test_pubkey_cmd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from application_client.boilerplate_command_sender import KaspaCommandSender, Errors
from application_client.boilerplate_response_unpacker import unpack_get_public_key_response
from application_client.kaspa_command_sender import KaspaCommandSender, Errors
from application_client.kaspa_response_unpacker import unpack_get_public_key_response
from ragger.bip import calculate_public_key_and_chaincode, CurveChoice
from ragger.backend import RaisePolicy
from ragger.navigator import NavInsID, NavIns
Expand Down
6 changes: 3 additions & 3 deletions tests/test_sign_cmd.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from application_client.boilerplate_transaction import Transaction
from application_client.boilerplate_command_sender import KaspaCommandSender, Errors
from application_client.boilerplate_response_unpacker import unpack_get_public_key_response, unpack_sign_tx_response
from application_client.kaspa_transaction import Transaction
from application_client.kaspa_command_sender import KaspaCommandSender, Errors
from application_client.kaspa_response_unpacker import unpack_get_public_key_response, unpack_sign_tx_response
from ragger.backend import RaisePolicy
from ragger.navigator import NavInsID
from utils import ROOT_SCREENSHOT_PATH, check_signature_validity
Expand Down
4 changes: 2 additions & 2 deletions tests/test_version_cmd.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
from application_client.boilerplate_command_sender import KaspaCommandSender
from application_client.boilerplate_response_unpacker import unpack_get_version_response
from application_client.kaspa_command_sender import KaspaCommandSender
from application_client.kaspa_response_unpacker import unpack_get_version_response

# Taken from the Makefile, to update every time the Makefile version is bumped
MAJOR = 0
Expand Down

0 comments on commit 59fe570

Please sign in to comment.