Skip to content

Commit

Permalink
chore: fix a spelling error.
Browse files Browse the repository at this point in the history
This commit does not include any modifications to any functionality.
  • Loading branch information
overcat committed May 23, 2024
1 parent f2a2331 commit 7733858
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 17 deletions.
4 changes: 2 additions & 2 deletions docs/COMMANDS.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
| `SIGN_TX` | 0x04 | Sign the raw transaction |
| `GET_APP_CONFIGURATION` | 0x06 | Get application configuration information |
| `SIGN_HASH` | 0x08 | Sign the hash |
| `SIGN_SOROBAN_AUTHORATION` | 0x0A | Sign the Soroban Authoration |
| `SIGN_SOROBAN_AUTHORIZATION` | 0x0A | Sign the Soroban Authorization |

## GET_PUBLIC_KEY

Expand Down Expand Up @@ -66,7 +66,7 @@
| ----------------------- | ------ | ---------------- |
| 64 | 0x9000 | `signature (64)` |

## SIGN_SOROBAN_AUTHORATION
## SIGN_SOROBAN_AUTHORIZATION

### Command

Expand Down
2 changes: 1 addition & 1 deletion src/apdu/dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ int apdu_dispatcher(const command_t *cmd) {
buf.offset = 0;

return handler_sign_tx(&buf, !cmd->p1, (bool) (cmd->p2 & P2_MORE));
case INS_SIGN_SOROBAN_AUTHORATION:
case INS_SIGN_SOROBAN_AUTHORIZATION:
if ((cmd->p1 != P1_FIRST && cmd->p1 != P1_MORE) ||
(cmd->p2 != P2_LAST && cmd->p2 != P2_MORE)) {
return io_send_sw(SW_WRONG_P1P2);
Expand Down
4 changes: 2 additions & 2 deletions src/handler/sign_auth.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ int handler_sign_auth(buffer_t *cdata, bool is_first_chunk, bool more) {
}

if (is_first_chunk) {
G_context.req_type = CONFIRM_SOROBAN_AUTHORATION;
G_context.req_type = CONFIRM_SOROBAN_AUTHORIZATION;
G_context.state = STATE_NONE;

if (!buffer_read_u8(cdata, &G_context.bip32_path_len) ||
Expand All @@ -58,7 +58,7 @@ int handler_sign_auth(buffer_t *cdata, bool is_first_chunk, bool more) {
memcpy(G_context.raw, cdata->ptr + cdata->offset, data_length);
G_context.raw_size += data_length;
} else {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION) {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORIZATION) {
return io_send_sw(SW_BAD_STATE);
}
memcpy(G_context.raw + G_context.raw_size, cdata->ptr, cdata->size);
Expand Down
2 changes: 1 addition & 1 deletion src/handler/sign_auth.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "buffer.h"

/**
* Handler for INS_SIGN_SOROBAN_AUTHORATION command. If successfully parse BIP32 path
* Handler for INS_SIGN_SOROBAN_AUTHORIZATION command. If successfully parse BIP32 path
* and soroban authorization, sign soroban authorization and send APDU response.
*
* @param[in,out] cdata
Expand Down
18 changes: 9 additions & 9 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@
* Enumeration with expected INS of APDU commands.
*/
typedef enum {
INS_GET_PUBLIC_KEY = 0x02, // public key of corresponding BIP32 path
INS_SIGN_TX = 0x04, // sign transaction with BIP32 path
INS_GET_APP_CONFIGURATION = 0x06, // app configuration of the application
INS_SIGN_HASH = 0x08, // sign transaction in hash mode
INS_SIGN_SOROBAN_AUTHORATION = 0x0a, // sign soroban authoration
INS_GET_PUBLIC_KEY = 0x02, // public key of corresponding BIP32 path
INS_SIGN_TX = 0x04, // sign transaction with BIP32 path
INS_GET_APP_CONFIGURATION = 0x06, // app configuration of the application
INS_SIGN_HASH = 0x08, // sign transaction in hash mode
INS_SIGN_SOROBAN_AUTHORIZATION = 0x0a, // sign soroban authorization
} command_e;

/**
Expand All @@ -32,10 +32,10 @@ typedef enum {
* Enumeration with user request type.
*/
typedef enum {
CONFIRM_ADDRESS, // confirm address derived from public key
CONFIRM_TRANSACTION, // confirm transaction information
CONFIRM_HASH, // confirm hash information
CONFIRM_SOROBAN_AUTHORATION // confirm soroban authoration information
CONFIRM_ADDRESS, // confirm address derived from public key
CONFIRM_TRANSACTION, // confirm transaction information
CONFIRM_HASH, // confirm hash information
CONFIRM_SOROBAN_AUTHORIZATION // confirm soroban authorization information
} request_type_e;

enum e_state {
Expand Down
2 changes: 1 addition & 1 deletion src/ui/bagl_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ int ui_display_transaction() {
}

int ui_display_auth() {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION || G_context.state != STATE_PARSED) {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORIZATION || G_context.state != STATE_PARSED) {
G_context.state = STATE_NONE;
return io_send_sw(SW_BAD_STATE);
}
Expand Down
2 changes: 1 addition & 1 deletion src/ui/nbgl_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -337,7 +337,7 @@ int ui_display_transaction(void) {
}

int ui_display_auth() {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORATION || G_context.state != STATE_PARSED) {
if (G_context.req_type != CONFIRM_SOROBAN_AUTHORIZATION || G_context.state != STATE_PARSED) {
G_context.state = STATE_NONE;
return io_send_sw(SW_BAD_STATE);
}
Expand Down

0 comments on commit 7733858

Please sign in to comment.