move some stack utility functions to common
This commit is contained in:
@@ -3,18 +3,7 @@
|
|||||||
#include "shared_context.h"
|
#include "shared_context.h"
|
||||||
#include "ui_callbacks.h"
|
#include "ui_callbacks.h"
|
||||||
#include "ethUtils.h"
|
#include "ethUtils.h"
|
||||||
|
#include "starkDisplayUtils.h"
|
||||||
void stark_sign_display_master_account() {
|
|
||||||
snprintf(strings.tmp.tmp,
|
|
||||||
sizeof(strings.tmp.tmp),
|
|
||||||
"0x%.*H",
|
|
||||||
32,
|
|
||||||
dataContext.starkContext.transferDestination);
|
|
||||||
}
|
|
||||||
|
|
||||||
void stark_sign_display_condition_fact() {
|
|
||||||
snprintf(strings.tmp.tmp, sizeof(strings.tmp.tmp), "0x%.*H", 32, dataContext.starkContext.fact);
|
|
||||||
}
|
|
||||||
|
|
||||||
// clang-format off
|
// clang-format off
|
||||||
UX_STEP_NOCB(ux_stark_limit_order_1_step,
|
UX_STEP_NOCB(ux_stark_limit_order_1_step,
|
||||||
|
|||||||
17
src_common/starkDisplayUtils.c
Normal file
17
src_common/starkDisplayUtils.c
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#ifdef HAVE_STARKWARE
|
||||||
|
|
||||||
|
#include "shared_context.h"
|
||||||
|
|
||||||
|
void stark_sign_display_master_account() {
|
||||||
|
snprintf(strings.tmp.tmp,
|
||||||
|
sizeof(strings.tmp.tmp),
|
||||||
|
"0x%.*H",
|
||||||
|
32,
|
||||||
|
dataContext.starkContext.transferDestination);
|
||||||
|
}
|
||||||
|
|
||||||
|
void stark_sign_display_condition_fact() {
|
||||||
|
snprintf(strings.tmp.tmp, sizeof(strings.tmp.tmp), "0x%.*H", 32, dataContext.starkContext.fact);
|
||||||
|
}
|
||||||
|
|
||||||
|
#endif
|
||||||
6
src_common/starkDisplayUtils.h
Normal file
6
src_common/starkDisplayUtils.h
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
#ifdef HAVE_STARKWARE
|
||||||
|
|
||||||
|
void stark_sign_display_master_account();
|
||||||
|
void stark_sign_display_condition_fact();
|
||||||
|
|
||||||
|
#endif
|
||||||
Reference in New Issue
Block a user