Skip to content

Commit

Permalink
fixed command not allowed
Browse files Browse the repository at this point in the history
  • Loading branch information
shufps committed Feb 7, 2024
1 parent a9597b6 commit 26a8649
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ include $(BOLOS_SDK)/Makefile.defines

APPVERSION_M = 0
APPVERSION_N = 8
APPVERSION_P = 6
APPVERSION_P = 7
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

APP_LOAD_PARAMS = --path "44'/1'" --curve ed25519 --appFlags 0x240 $(COMMON_LOAD_PARAMS)
Expand Down
11 changes: 6 additions & 5 deletions src/api.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ uint32_t api_write_data_block(uint8_t block_number, const uint8_t *input_data,

uint32_t api_read_data_block(uint8_t block_number)
{
if (api.data.type != GENERATED_ADDRESSES && api.data.type != SIGNATURES) {
if (api.data.type != GENERATED_ADDRESSES &&
api.data.type != GENERATED_PUBLIC_KEYS && api.data.type != SIGNATURES) {
THROW(SW_COMMAND_NOT_ALLOWED);
}

Expand Down Expand Up @@ -389,7 +390,7 @@ uint32_t api_generate_address(uint8_t show_on_screen, const uint8_t *data,
}

uint32_t api_generate_public_key(uint8_t show_on_screen, const uint8_t *data,
uint32_t len)
uint32_t len)
{
// maybe we need it ...
UNUSED(show_on_screen);
Expand Down Expand Up @@ -451,9 +452,9 @@ uint32_t api_generate_public_key(uint8_t show_on_screen, const uint8_t *data,
memset(api.data.buffer, 0, API_BUFFER_SIZE_BYTES);
for (uint32_t i = 0; i < req.count; i++) {
// with address_type
uint8_t ret = public_key_generate(
api.bip32_path, BIP32_PATH_LEN,
&api.data.buffer[i * PUBKEY_SIZE_BYTES]);
uint8_t ret =
public_key_generate(api.bip32_path, BIP32_PATH_LEN,
&api.data.buffer[i * PUBKEY_SIZE_BYTES]);

if (!ret) {
THROW(SW_UNKNOWN);
Expand Down

0 comments on commit 26a8649

Please sign in to comment.