Skip to content

Commit

Permalink
Merge pull request #211 from Zondax/ci
Browse files Browse the repository at this point in the history
  • Loading branch information
carlosala authored Feb 21, 2024
2 parents 828eb04 + e46b165 commit 9d06c78
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 1 deletion.
18 changes: 18 additions & 0 deletions .github/workflows/swap.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Swap functional tests

on:
workflow_dispatch:
push:
branches:
- master
- main
- develop
pull_request:

jobs:
job_functional_tests:
uses: LedgerHQ/app-exchange/.github/workflows/reusable_swap_functional_tests.yml@develop
with:
branch_for_polkadot: ${{ github.ref }}
repo_for_polkadot: ${{ github.repository }}
test_filter: '"DOT or dot or Polkadot or polkadot"'
3 changes: 2 additions & 1 deletion app/src/swap/handle_sign_transaction.c
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,8 @@ parser_error_t check_swap_conditions(const parser_context_t *ctx) {
ctx->tx_obj->callIndex.moduleIdx,
ctx->tx_obj->callIndex.idx));

if (strncmp(tmp_str, &valid_tx_method[0], strlen(valid_tx_method)) != 0) {
if (strnlen(tmp_str, sizeof(tmp_str)) != strlen(valid_tx_method) ||
strncmp(tmp_str, &valid_tx_method[0], strlen(valid_tx_method)) != 0) {
ZEMU_LOGF(200, "Wrong swap tx method (%s, should be : %s).\n", tmp_str, valid_tx_method);
return parser_swap_tx_wrong_method;
}
Expand Down

0 comments on commit 9d06c78

Please sign in to comment.