Skip to content

Commit

Permalink
Update version.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed Aug 2, 2024
1 parent 4581005 commit 92bc9c9
Show file tree
Hide file tree
Showing 3 changed files with 29 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
- name : Install yarn
run: npm install --global yarn
- name: Install Cardano JS Library (Ledger fork)
run: git clone https://github.com/LedgerHQ/ledgerjs-cardano-shelley.git
run: git clone https://github.com/vacuumlabs/ledgerjs-cardano-shelley.git
- name : Run tests
run: |
BUILD_DEVICE_NAME="$(echo ${{ matrix.device }} | sed 's/nanosp/nanos2/')"
Expand Down
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ APPNAME = "Cardano ADA"

# Application version
APPVERSION_M = 7
APPVERSION_N = 2
APPVERSION_P = 0
APPVERSION_N = 1
APPVERSION_P = 2
APPVERSION = "$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)"

# Application source files
Expand All @@ -56,7 +56,7 @@ VARIANT_VALUES = cardano_ada

DEFINES += RESET_ON_CRASH
# Enabling DEBUG flag will enable PRINTF and disable optimizations
# DEVEL = 1
DEVEL = 1
# DEFINES += HEADLESS

# Enabling debug PRINTF
Expand Down
50 changes: 25 additions & 25 deletions src/ui_nbgl.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,15 @@ enum {
};

typedef enum {
STATUS_TYPE_TRANSACTION,
STATUS_TYPE_ADDRESS,
STATUS_TYPE_TRANSACTION,
STATUS_TYPE_ADDRESS,
} statusType_t;

typedef struct {
bool standardStatus;
statusType_t statusType;
const char* confirmedStatus; // text displayed in confirmation page (after long press)
const char* rejectedStatus; // text displayed in rejection page (after reject confirmed)
statusType_t statusType;
const char* confirmedStatus; // text displayed in confirmation page (after long press)
const char* rejectedStatus; // text displayed in rejection page (after reject confirmed)
callback_t approvedCallback;
callback_t rejectedCallback;
callback_t pendingDisplayPageFn;
Expand Down Expand Up @@ -130,8 +130,8 @@ static void reset_transaction_current_context(void)
void nbgl_reset_transaction_full_context(void)
{
reset_transaction_current_context();
uiContext.standardStatus = false;
uiContext.statusType = STATUS_TYPE_TRANSACTION;
uiContext.standardStatus = false;
uiContext.statusType = STATUS_TYPE_TRANSACTION;
uiContext.pendingElement = 0;
uiContext.lightConfirmation = false;
uiContext.rejectedStatus = NULL;
Expand Down Expand Up @@ -259,15 +259,18 @@ static void display_cancel_status(void)

if (uiContext.rejectedStatus) {
nbgl_useCaseStatus(uiContext.rejectedStatus, false, cancellation_status_callback);
} else {
switch (uiContext.statusType) {
case STATUS_TYPE_TRANSACTION:
nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED, cancellation_status_callback);
break;
case STATUS_TYPE_ADDRESS:
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED, cancellation_status_callback);
break;
}
}
else {
switch (uiContext.statusType) {
case STATUS_TYPE_TRANSACTION:
nbgl_useCaseReviewStatus(STATUS_TYPE_TRANSACTION_REJECTED,
cancellation_status_callback);
break;
case STATUS_TYPE_ADDRESS:
nbgl_useCaseReviewStatus(STATUS_TYPE_ADDRESS_REJECTED,
cancellation_status_callback);
break;
}
}
}

Expand Down Expand Up @@ -544,14 +547,14 @@ void display_address(callback_t userAcceptCallback, callback_t userRejectCallbac
TRACE("Displaying Address");
set_callbacks(userAcceptCallback, userRejectCallback);

uint8_t address_index = 0;
uint8_t address_index = 0;

// Address field is not displayed in pairList, so there is one element less.
uiContext.pairList.nbPairs = uiContext.currentElementCount - 1;
uiContext.pairList.pairs = tagValues;

uiContext.standardStatus = true;
uiContext.statusType = STATUS_TYPE_ADDRESS;
uiContext.standardStatus = true;
uiContext.statusType = STATUS_TYPE_ADDRESS;

for (uint8_t i = 0; i < uiContext.currentElementCount; i++) {
if (strcmp(uiContext.tagTitle[i], "Address")) {
Expand All @@ -562,12 +565,9 @@ void display_address(callback_t userAcceptCallback, callback_t userRejectCallbac
}
}

nbgl_useCaseAddressReview(uiContext.tagContent[address_index],
&uiContext.pairList,
&C_cardano_64,
"Verify Cardano address",
NULL,
light_confirm_callback);
nbgl_useCaseAddressReview(uiContext.tagContent[address_index], &uiContext.pairList,
&C_cardano_64, "Verify Cardano address", NULL,
light_confirm_callback);
reset_transaction_current_context();

#ifdef HEADLESS
Expand Down

0 comments on commit 92bc9c9

Please sign in to comment.