Skip to content

Commit 5bfbacc

Browse files
Merge pull request #604 from LedgerHQ/fbe/fix_clone_icons_in_review
Fix clone icons not being used in review context
2 parents 115fe9a + 7b0fd02 commit 5bfbacc

File tree

278 files changed

+8
-4
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+8
-4
lines changed

ethereum-plugin-sdk

src_nbgl/ui_approve_tx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,16 @@ static const nbgl_icon_details_t *get_tx_icon(void) {
5555
const nbgl_icon_details_t *icon = NULL;
5656

5757
if (tx_approval_context.fromPlugin && (pluginType == EXTERNAL)) {
58-
if (caller_app && caller_app->name) {
59-
if ((strlen(strings.common.toAddress) == strlen(caller_app->name)) &&
60-
(strcmp(strings.common.toAddress, caller_app->name) == 0)) {
58+
if ((caller_app != NULL) && (caller_app->name != NULL)) {
59+
if (strcmp(strings.common.toAddress, caller_app->name) == 0) {
6160
icon = get_app_icon(true);
6261
}
6362
}
63+
// icon is NULL in this case
64+
// Check with Alex if this is expected or a bug
65+
} else if ((caller_app != NULL) && !tx_approval_context.fromPlugin) {
66+
// Clone case
67+
icon = get_app_icon(true);
6468
} else {
6569
uint64_t chain_id = get_tx_chain_id();
6670
if (chain_id == chainConfig->chainId) {
5 Bytes
3 Bytes
6 Bytes
9 Bytes
-1 Bytes
4 Bytes
6.37 KB
-6.51 KB

0 commit comments

Comments
 (0)