Skip to content

Commit 6a5e172

Browse files
authored
feat: show processing screen during silent get_address (#56)
* feat: show processing screen during silent get_address * bump version * snapshots
1 parent 56141f5 commit 6a5e172

13 files changed

Lines changed: 16 additions & 4 deletions

File tree

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ GIT_DESCRIBE=$(shell git describe --tags --abbrev=8 --always --long --dirty 2>/d
3737
VERSION_TAG=$(shell echo $(GIT_DESCRIBE) | sed 's/^v//g')
3838
APPVERSION_M=1
3939
APPVERSION_N=6
40-
APPVERSION_P=2
40+
APPVERSION_P=3
4141
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
4242
APPNAME = "Mina"
4343

src/get_address.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,18 @@
11
#include "get_address.h"
22
#include "utils.h"
33
#include "crypto.h"
4+
#include "menu.h"
45

56
static uint32_t _account = 0;
67
char _bip44_path[27]; // max length when 44'/12586'/4294967295'/0/0
78
char _address[MINA_ADDRESS_LEN];
89

910

1011
static void compute_address_and_response() {
12+
show_processing();
1113
compute_address();
1214
sendResponse(set_result_get_address(), true);
15+
ui_idle();
1316
}
1417

1518
void handle_get_address(uint8_t p1, uint8_t p2, uint8_t *dataBuffer,

src/get_address.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ void prepare_bip44_path();
99
void compute_address();
1010

1111
void show_address_and_response();
12+
void show_processing();
1213

1314
void handle_get_address(uint8_t p1, uint8_t p2, uint8_t *dataBuffer,
1415
uint8_t dataLength, volatile unsigned int *flags);

src/get_address_bagl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,10 +106,14 @@ extern char _address[MINA_ADDRESS_LEN];
106106
}
107107
);
108108

109+
void show_processing() {
110+
ux_flow_init(0, ux_get_address_processing_flow, NULL);
111+
}
112+
109113
UX_STEP_VALID(
110114
ux_get_address_flow_generate_step,
111115
pb,
112-
{ ux_flow_init(0, ux_get_address_processing_flow, NULL); compute_address(); ux_flow_init(0, ux_get_address_result_flow, NULL); },
116+
{ show_processing(); compute_address(); ux_flow_init(0, ux_get_address_result_flow, NULL); },
113117
{
114118
&C_icon_validate_14,
115119
"Generate"

src/get_address_nbgl.c

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,12 @@ static void confirmation_callback(bool confirm) {
2727
}
2828
}
2929

30-
void show_address_and_response() {
30+
void show_processing() {
3131
nbgl_useCaseSpinner("Processing");
32+
}
33+
34+
void show_address_and_response() {
35+
show_processing();
3236
compute_address();
3337

3438
transactionContext.tagValuePair[0].item = "Path";
-3 Bytes
Loading
54 Bytes
Loading
-9 Bytes
Loading
-9 Bytes
Loading
2 Bytes
Loading

0 commit comments

Comments
 (0)