Embedded SDK
Embedded SDK
Loading...
Searching...
No Matches
transaction_check_internal.h
Go to the documentation of this file.
1/*****************************************************************************
2 * (c) 2026 Ledger SAS.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 *****************************************************************************/
16
21
22#pragma once
23
24#include <stdbool.h>
25#include "transaction_check.h"
26
27#if defined(HAVE_SWAP)
28#include "swap_utils.h"
29#endif
30
31#if defined(HAVE_TX_CHECK)
32
36static inline bool tx_check_in_swap(void)
37{
38#if defined(HAVE_SWAP)
39 return G_called_from_swap;
40#else
41 return false;
42#endif
43}
44
45#if defined(HAVE_TX_CHECK_APDU)
52#endif // HAVE_TX_CHECK_APDU
53
54#endif // HAVE_TX_CHECK
volatile bool G_called_from_swap
Definition swap_utils.c:23
Transaction Check: risk report from a security provider, displayed during the review.
tx_check_status_t
static bool tx_check_in_swap(void)
Tell whether the app runs a swap started by the Exchange app.
tx_check_status_t tx_check_opt_in_sdk_apdu(void)
Opt-in request received on the SDK APDU, whose reply is sent by the SDK.