Skip to content

Commit

Permalink
Merge pull request LedgerHQ#458 from LedgerHQ/develop
Browse files Browse the repository at this point in the history
App release 1.10.3
  • Loading branch information
apaillier-ledger authored Jul 31, 2023
2 parents 1c024e5 + 5de8726 commit 2264f67
Show file tree
Hide file tree
Showing 406 changed files with 2,366 additions and 505 deletions.
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Describe your issue in as much detail as possible here.

* OS and version
* branch that causes this issue
* Device (Nano S, Nano X, Ledger Blue)
* Device (Nano S, Nano S Plus, Nano X, Ledger Blue)

## Steps to reproduce

Expand Down
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,4 @@ Describe your issue in as much detail as possible here.

* OS and version
* branch that causes this issue
* Device (Nano S, Nano X, Ledger Blue)
* Device (Nano S, Nano S Plus, Nano X, Ledger Blue)
5 changes: 2 additions & 3 deletions .github/workflows/ci-workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ jobs:
jobs-e2e-speculos-tests:
name: Speculos tests
strategy:
fail-fast: false
matrix:
model: ["nanosp", "nanos", "nanox"]

Expand All @@ -153,7 +154,7 @@ jobs:
run: |
cd tests/speculos
sudo apt-get update && sudo apt-get install -y qemu-user-static
pip install --extra-index-url https://test.pypi.org/simple/ -r requirements.txt
pip install -r requirements.txt
- name: Run speculos tests
run: |
Expand All @@ -171,7 +172,6 @@ jobs:
with:
upload_app_binaries_artifact: "ragger_elfs"
flags: "DEBUG=1 CAL_CI_KEY=1 DOMAIN_NAME_TEST_KEY=1"
run_for_devices: '["nanos", "nanox", "nanosp"]'

jobs-ragger-tests:
name: Run Ragger tests
Expand All @@ -180,4 +180,3 @@ jobs:
with:
download_app_binaries_artifact: "ragger_elfs"
test_dir: tests/ragger
run_for_devices: '["nanos", "nanox", "nanosp"]'
16 changes: 16 additions & 0 deletions .github/workflows/swap-ci-workflow.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Swap functional tests

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

jobs:
job_functional_tests:
uses: LedgerHQ/app-exchange/.github/workflows/reusable_swap_functional_tests.yml@develop
with:
branch_for_ethereum: ${{ github.ref }}
test_filter: '"ETH or eth or Ethereum or ethereum"'
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ bin/
debug/
dep/
obj/
build/

# Python
*.pyc
Expand Down
27 changes: 27 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,33 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [1.10.3](https://github.com/ledgerhq/app-ethereum/compare/1.10.2...1.10.3) - 2023-07-27

### Added

- (network) LUKSO mainnet & testnet
- (network) Chiado
- (network) PulseChain
- (network) Neon EVM mainnet & devnet
- (network) Venidium
- (network) Telos EVM mainnet
- (network) OKBChain mainnet
- (network) Polygon zkEVM
- (network) Base
- (network) Sepolia
- ENS on chains that share the Ethereum derivation path
- Ledger Stax support

### Changed

- (network) xDai renamed to Gnosis

### Fixed

- Missing context cleanup between plugin calls
- Miscellaneous swap issues
- Improper EIP-712 array handling

## [1.10.2](https://github.com/ledgerhq/app-ethereum/compare/1.10.1...1.10.2) - 2023-04-24

### Added
Expand Down
45 changes: 31 additions & 14 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ APP_LOAD_PARAMS += --path "1517992542'/1101353413'"

APPVERSION_M=1
APPVERSION_N=10
APPVERSION_P=2
APPVERSION_P=3
APPVERSION=$(APPVERSION_M).$(APPVERSION_N).$(APPVERSION_P)
APP_LOAD_FLAGS= --appFlags 0xa40 --dep Ethereum:$(APPVERSION)

Expand All @@ -54,6 +54,7 @@ include ./makefile_conf/chain/$(CHAIN).mk
else
$(error Unsupported CHAIN - use $(SUPPORTED_CHAINS))
endif
CFLAGS += -DAPPNAME=\"$(APPNAME)\"

#########
# Other #
Expand All @@ -65,6 +66,12 @@ DEFINES += $(DEFINES_LIB)
#prepare hsm generation
ifeq ($(TARGET_NAME),TARGET_NANOS)
ICONNAME=icons/nanos_app_$(CHAIN).gif
else ifeq ($(TARGET_NAME),TARGET_STAX)
ICONNAME=icons/stax_app_$(CHAIN).gif
DEFINES += ICONGLYPH=C_stax_$(CHAIN)_64px
DEFINES += ICONBITMAP=C_stax_$(CHAIN)_64px_bitmap
DEFINES += ICONGLYPH_SMALL=C_stax_$(CHAIN)
GLYPH_FILES += $(ICONNAME)
else
ICONNAME=icons/nanox_app_$(CHAIN).gif
endif
Expand All @@ -79,9 +86,10 @@ all: default
############

DEFINES += OS_IO_SEPROXYHAL
DEFINES += HAVE_BAGL HAVE_SPRINTF HAVE_SNPRINTF_FORMAT_U
DEFINES += HAVE_SPRINTF HAVE_SNPRINTF_FORMAT_U
DEFINES += HAVE_IO_USB HAVE_L4_USBLIB IO_USB_MAX_ENDPOINTS=4 IO_HID_EP_LENGTH=64 HAVE_USB_APDU
DEFINES += LEDGER_MAJOR_VERSION=$(APPVERSION_M) LEDGER_MINOR_VERSION=$(APPVERSION_N) LEDGER_PATCH_VERSION=$(APPVERSION_P)
DEFINES += BUILD_YEAR=\"$(shell date +%Y)\"

# U2F
DEFINES += HAVE_U2F HAVE_IO_U2F
Expand All @@ -90,30 +98,41 @@ DEFINES += USB_SEGMENT_SIZE=64
DEFINES += BLE_SEGMENT_SIZE=32 #max MTU, min 20
DEFINES += UNUSED\(x\)=\(void\)x
DEFINES += APPVERSION=\"$(APPVERSION)\"
DEFINES += HAVE_UX_FLOW

#WEBUSB_URL = www.ledgerwallet.com
#DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=$(shell echo -n $(WEBUSB_URL) | wc -c) WEBUSB_URL=$(shell echo -n $(WEBUSB_URL) | sed -e "s/./\\\'\0\\\',/g")

DEFINES += HAVE_WEBUSB WEBUSB_URL_SIZE_B=0 WEBUSB_URL=""

ifeq ($(TARGET_NAME),TARGET_NANOX)
ifneq (,$(filter $(TARGET_NAME),TARGET_NANOX TARGET_STAX))
DEFINES += HAVE_BLE BLE_COMMAND_TIMEOUT_MS=2000
DEFINES += HAVE_BLE_APDU # basic ledger apdu transport over BLE
SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
endif

ifeq ($(TARGET_NAME),TARGET_NANOS)
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=72
DEFINES += HAVE_WALLET_ID_SDK
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=128
else
DEFINES += IO_SEPROXYHAL_BUFFER_SIZE_B=300
endif

ifeq ($(TARGET_NAME),TARGET_STAX)
DEFINES += NBGL_QRCODE
else
DEFINES += HAVE_BAGL
DEFINES += HAVE_UX_FLOW
ifeq ($(TARGET_NAME),TARGET_NANOS)
DEFINES += HAVE_WALLET_ID_SDK
DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=32
else
DEFINES += HAVE_GLO096
DEFINES += HAVE_BAGL BAGL_WIDTH=128 BAGL_HEIGHT=64
DEFINES += BAGL_WIDTH=128 BAGL_HEIGHT=64
DEFINES += HAVE_BAGL_ELLIPSIS # long label truncation feature
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_REGULAR_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_EXTRABOLD_11PX
DEFINES += HAVE_BAGL_FONT_OPEN_SANS_LIGHT_16PX
endif
endif

# Enables direct data signing without having to specify it in the settings. Useful when testing with speculos.
ALLOW_DATA:=0
Expand Down Expand Up @@ -167,7 +186,6 @@ endif
endif

# Enabling debug PRINTF
DEBUG:=0
ifneq ($(DEBUG),0)
DEFINES += HAVE_STACK_OVERFLOW_CHECK
ifeq ($(TARGET_NAME),TARGET_NANOS)
Expand Down Expand Up @@ -204,13 +222,11 @@ endif

CC := $(CLANGPATH)clang

#CFLAGS += -O0
CFLAGS += -Oz -Wno-format-invalid-specifier -Wno-format-extra-args
CFLAGS += -Wno-format-invalid-specifier -Wno-format-extra-args

AS := $(GCCPATH)arm-none-eabi-gcc

LD := $(GCCPATH)arm-none-eabi-gcc
LDFLAGS += -O3 -Os
LDLIBS += -lm -lgcc -lc

# import rules to compile glyphs(/pone)
Expand All @@ -219,11 +235,12 @@ include $(BOLOS_SDK)/Makefile.glyphs
### variables processed by the common makefile.rules of the SDK to grab source files and include dirs
APP_SOURCE_PATH += src_common src src_features src_plugins
SDK_SOURCE_PATH += lib_stusb lib_stusb_impl lib_u2f
ifeq ($(TARGET_NAME),TARGET_STAX)
APP_SOURCE_PATH += src_nbgl
else
SDK_SOURCE_PATH += lib_ux
ifeq ($(TARGET_NAME),TARGET_NANOX)
SDK_SOURCE_PATH += lib_blewbxx lib_blewbxx_impl
endif
APP_SOURCE_PATH += src_bagl
endif

### initialize plugin SDK submodule if needed, rebuild it, and warn if a difference is noticed
ifeq ($(CHAIN),ethereum)
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<h1 align="center">app-ethereum</h1>

<p align="center">
Ethereum wallet application for Ledger Blue, Nano S and Nano X
Ethereum wallet application for Ledger Blue, Nano S, Nano S Plus and Nano X
<br />
<a href="https://github.com/LedgerHQ/app-ethereum/tree/master/doc"><strong>« Explore the docs »</strong></a>
<br />
Expand Down Expand Up @@ -42,7 +42,7 @@

## About the project

Ethereum wallet application framework for Nano S and Nano X.
Ethereum wallet application framework for Nano S, Nano S Plus and Nano X.
Ledger Blue is not maintained anymore, but the app can still be compiled for this target using the branch [`blue-final-release`](https://github.com/LedgerHQ/app-ethereum/tree/blue-final-release).

## Documentation
Expand Down
2 changes: 1 addition & 1 deletion ethereum-plugin-sdk
Binary file removed glyphs/badge_transaction.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_akroma.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_atheios.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_callisto.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_dexon.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ellaism.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_eosclassic.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ether1.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ethereum.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ethereum_classic.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ethergem.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ethersocial.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_expanse.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_gochain.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_hpb.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_mix.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_musicoin.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_pirl.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_poa.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_reosc.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ropsten.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_rsk.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_rsk_testnet.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_thundercore.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_tomochain.gif
Binary file not shown.
Binary file removed glyphs/blue_badge_ubiq.gif
Diff not rendered.
Binary file removed glyphs/blue_badge_wanchain.gif
Diff not rendered.
Binary file removed glyphs/blue_badge_webchain.gif
Diff not rendered.
Binary file removed glyphs/icon_back.gif
Diff not rendered.
Binary file removed glyphs/icon_back_x.gif
Diff not rendered.
Binary file removed glyphs/icon_certificate.gif
Diff not rendered.
Binary file removed glyphs/icon_crossmark.gif
Diff not rendered.
Binary file removed glyphs/icon_dashboard.gif
Diff not rendered.
Binary file removed glyphs/icon_dashboard_x.gif
Diff not rendered.
Binary file removed glyphs/icon_down.gif
Diff not rendered.
Binary file removed glyphs/icon_eye.gif
Diff not rendered.
Binary file removed glyphs/icon_left.gif
Diff not rendered.
Binary file removed glyphs/icon_right.gif
Diff not rendered.
Binary file removed glyphs/icon_toggle_reset.gif
Diff not rendered.
Binary file removed glyphs/icon_toggle_set.gif
Diff not rendered.
Binary file removed glyphs/icon_up.gif
Diff not rendered.
Binary file removed glyphs/icon_validate_14.gif
Diff not rendered.
Binary file removed glyphs/icon_warning.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_akroma.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_artis_sigma1.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_artis_tau1.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_atheios.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_callisto.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_dexon.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ellaism.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ether1.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ethereum.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ethereum_classic.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ethergem.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ethersocial.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_expanse.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_gochain.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_hpb.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_kusd.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_mix.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_musicoin.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_pirl.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_poa.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_reosc.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ropsten.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_rsk.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_rsk_testnet.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_thundercore.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_tomochain.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_ubiq.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_wanchain.gif
Diff not rendered.
Binary file removed glyphs/nanos_badge_webchain.gif
Diff not rendered.
Binary file added glyphs/stax_akroma_64px.gif
Binary file added glyphs/stax_apothemnetwork_64px.gif
Binary file added glyphs/stax_artis_sigma1_64px.gif
Binary file added glyphs/stax_artis_tau1_64px.gif
Binary file added glyphs/stax_astar_64px.gif
Binary file added glyphs/stax_atheios_64px.gif
Binary file added glyphs/stax_bsc_64px.gif
Binary file added glyphs/stax_bttc_64px.gif
Binary file added glyphs/stax_callisto_64px.gif
Binary file added glyphs/stax_conflux_espace_64px.gif
Binary file added glyphs/stax_cube_64px.gif
Binary file added glyphs/stax_dexon_64px.gif
Binary file added glyphs/stax_ellaism_64px.gif
Binary file added glyphs/stax_energywebchain_64px.gif
Binary file added glyphs/stax_ether1_64px.gif
Binary file added glyphs/stax_ethereum_64px.gif
Binary file added glyphs/stax_ethereum_classic_64px.gif
Binary file added glyphs/stax_ethergem_64px.gif
Binary file added glyphs/stax_ethersocial_64px.gif
Binary file added glyphs/stax_expanse_64px.gif
Binary file added glyphs/stax_flare_64px.gif
Binary file added glyphs/stax_flare_coston_64px.gif
Binary file added glyphs/stax_gochain_64px.gif
Binary file added glyphs/stax_goerli_64px.gif
Binary file added glyphs/stax_hpb_64px.gif
Binary file added glyphs/stax_id4good_64px.gif
Binary file added glyphs/stax_kardiachain_64px.gif
Binary file added glyphs/stax_kusd_64px.gif
Binary file added glyphs/stax_meter_64px.gif
Binary file added glyphs/stax_mix_64px.gif
Binary file added glyphs/stax_moonbeam_64px.gif
Binary file added glyphs/stax_moonriver_64px.gif
Binary file added glyphs/stax_multivac_64px.gif
Binary file added glyphs/stax_musicoin_64px.gif
Binary file added glyphs/stax_oasys_64px.gif
Binary file added glyphs/stax_okc_64px.gif
Binary file added glyphs/stax_pirl_64px.gif
Binary file added glyphs/stax_poa_64px.gif
Binary file added glyphs/stax_polygon_64px.gif
Binary file added glyphs/stax_reosc_64px.gif
Binary file added glyphs/stax_ropsten_64px.gif
Binary file added glyphs/stax_rsk_64px.gif
Binary file added glyphs/stax_rsk_testnet_64px.gif
Binary file added glyphs/stax_shiden_64px.gif
Binary file added glyphs/stax_shyft_64px.gif
Binary file added glyphs/stax_songbird_64px.gif
Binary file added glyphs/stax_tecracoin_64px.gif
Binary file added glyphs/stax_tecratestnet_64px.gif
Binary file added glyphs/stax_thundercore_64px.gif
Binary file added glyphs/stax_tobalaba_64px.gif
Binary file added glyphs/stax_tomochain_64px.gif
Binary file added glyphs/stax_ubiq_64px.gif
Binary file added glyphs/stax_volta_64px.gif
Binary file added glyphs/stax_wanchain_64px.gif
Binary file added glyphs/stax_webchain_64px.gif
Binary file added glyphs/stax_wethio_64px.gif
Binary file added glyphs/stax_xdcnetwork_64px.gif
Binary file removed icons/akroma.png
Diff not rendered.
Binary file removed icons/artis_sigma1.png
Diff not rendered.
Binary file removed icons/artis_tau1.png
Diff not rendered.
Binary file removed icons/atheios.png
Diff not rendered.
Binary file removed icons/blue_app_akroma.gif
Diff not rendered.
Binary file removed icons/blue_app_artis_sigma1.gif
Diff not rendered.
Binary file removed icons/blue_app_artis_tau1.gif
Diff not rendered.
Binary file removed icons/blue_app_atheios.gif
Diff not rendered.
Binary file removed icons/blue_app_callisto.gif
Diff not rendered.
Binary file removed icons/blue_app_dexon.gif
Diff not rendered.
Binary file removed icons/blue_app_ellaism.gif
Diff not rendered.
Binary file removed icons/blue_app_ether1.gif
Diff not rendered.
Binary file removed icons/blue_app_ethereum.gif
Diff not rendered.
Binary file removed icons/blue_app_ethereum_classic.gif
Diff not rendered.
Binary file removed icons/blue_app_ethergem.gif
Diff not rendered.
Binary file removed icons/blue_app_ethersocial.gif
Diff not rendered.
Binary file removed icons/blue_app_ewc.gif
Diff not rendered.
Binary file removed icons/blue_app_expanse.gif
Diff not rendered.
Binary file removed icons/blue_app_gochain.gif
Diff not rendered.
Binary file removed icons/blue_app_goerli.gif
Diff not rendered.
Binary file removed icons/blue_app_hpb.gif
Diff not rendered.
Binary file removed icons/blue_app_kusd.gif
Diff not rendered.
Binary file removed icons/blue_app_mix.gif
Diff not rendered.
Binary file removed icons/blue_app_musicoin.gif
Diff not rendered.
Binary file removed icons/blue_app_pirl.gif
Diff not rendered.
Binary file removed icons/blue_app_poa.gif
Diff not rendered.
Binary file removed icons/blue_app_reosc.gif
Diff not rendered.
Binary file removed icons/blue_app_ropsten.gif
Diff not rendered.
Binary file removed icons/blue_app_rsk.gif
Diff not rendered.
Binary file removed icons/blue_app_rsk_testnet.gif
Diff not rendered.
Binary file removed icons/blue_app_theta.gif
Diff not rendered.
Binary file removed icons/blue_app_thundercore.gif
Diff not rendered.
Binary file removed icons/blue_app_tobalaba.gif
Diff not rendered.
Binary file removed icons/blue_app_tomochain.gif
Diff not rendered.
Binary file removed icons/blue_app_ubiq.gif
Diff not rendered.
Binary file removed icons/blue_app_volta.gif
Diff not rendered.
Binary file removed icons/blue_app_wanchain.gif
Diff not rendered.
Binary file removed icons/blue_app_webchain.gif
Diff not rendered.
Binary file removed icons/blue_badge_thundercore.gif
Diff not rendered.
Binary file removed icons/blue_badge_tomochain.gif
Diff not rendered.
Binary file removed icons/callisto.png
Diff not rendered.
Binary file removed icons/dexon.png
Diff not rendered.
Binary file removed icons/ellaism.png
Diff not rendered.
Binary file removed icons/ether1.png
Diff not rendered.
Binary file removed icons/ethereum.png
Diff not rendered.
Binary file removed icons/ethereum_classic.png
Diff not rendered.
Binary file removed icons/ethergem.png
Diff not rendered.
Binary file removed icons/ethersocial.png
Diff not rendered.
Binary file removed icons/ewc.png
Diff not rendered.
Binary file removed icons/expanse.png
Diff not rendered.
Binary file removed icons/flare.png
Diff not rendered.
Binary file removed icons/flare_coston.png
Diff not rendered.
Binary file removed icons/gochain.png
Diff not rendered.
Binary file removed icons/goerli.png
Diff not rendered.
Binary file removed icons/hpb.png
Diff not rendered.
Binary file removed icons/icon_split.gif
Diff not rendered.
Binary file removed icons/kusd.png
Diff not rendered.
Binary file removed icons/mix.png
Diff not rendered.
Binary file removed icons/musicoin.png
Diff not rendered.
Empty file modified icons/nanos_app_tecracoin.gif
100755 → 100644
Empty file modified icons/nanos_app_tecratestnet.gif
100755 → 100644
Empty file modified icons/nanox_app_tecracoin.gif
100755 → 100644
Empty file modified icons/nanox_app_tecratestnet.gif
100755 → 100644
Binary file removed icons/pirl.png
Diff not rendered.
Binary file removed icons/poa.png
Diff not rendered.
Binary file removed icons/reosc.png
Diff not rendered.
Binary file removed icons/ropsten.png
Diff not rendered.
Binary file removed icons/rsk.png
Diff not rendered.
Binary file removed icons/rsk_testnet.png
Diff not rendered.
Binary file removed icons/songbird.png
Diff not rendered.
Binary file added icons/stax_app_akroma.gif
Binary file added icons/stax_app_apothemnetwork.gif
Binary file added icons/stax_app_artis_sigma1.gif
Binary file added icons/stax_app_artis_tau1.gif
Binary file added icons/stax_app_astar.gif
Binary file added icons/stax_app_atheios.gif
Binary file added icons/stax_app_bsc.gif
Binary file added icons/stax_app_bttc.gif
Binary file added icons/stax_app_callisto.gif
Binary file added icons/stax_app_conflux_espace.gif
Binary file added icons/stax_app_cube.gif
Binary file added icons/stax_app_dexon.gif
Binary file added icons/stax_app_ellaism.gif
Binary file added icons/stax_app_energywebchain.gif
Binary file added icons/stax_app_ether1.gif
Binary file added icons/stax_app_ethereum.gif
Binary file added icons/stax_app_ethereum_classic.gif
Binary file added icons/stax_app_ethergem.gif
Binary file added icons/stax_app_ethersocial.gif
Binary file added icons/stax_app_expanse.gif
Binary file added icons/stax_app_flare.gif
Binary file added icons/stax_app_flare_coston.gif
Binary file added icons/stax_app_gochain.gif
Binary file added icons/stax_app_goerli.gif
Binary file added icons/stax_app_hpb.gif
Binary file added icons/stax_app_id4good.gif
Binary file added icons/stax_app_kardiachain.gif
Binary file added icons/stax_app_kusd.gif
Binary file added icons/stax_app_meter.gif
Binary file added icons/stax_app_mix.gif
Binary file added icons/stax_app_moonbeam.gif
Binary file added icons/stax_app_moonriver.gif
Binary file added icons/stax_app_multivac.gif
Binary file added icons/stax_app_musicoin.gif
Binary file added icons/stax_app_oasys.gif
Binary file added icons/stax_app_okc.gif
Binary file added icons/stax_app_pirl.gif
Binary file added icons/stax_app_poa.gif
Binary file added icons/stax_app_polygon.gif
Binary file added icons/stax_app_reosc.gif
Binary file added icons/stax_app_ropsten.gif
Binary file added icons/stax_app_rsk.gif
Binary file added icons/stax_app_rsk_testnet.gif
Binary file added icons/stax_app_shiden.gif
Binary file added icons/stax_app_shyft.gif
Binary file added icons/stax_app_songbird.gif
Binary file added icons/stax_app_tecracoin.gif
Binary file added icons/stax_app_tecratestnet.gif
Binary file added icons/stax_app_thundercore.gif
Binary file added icons/stax_app_tobalaba.gif
Binary file added icons/stax_app_tomochain.gif
Binary file added icons/stax_app_ubiq.gif
Binary file added icons/stax_app_volta.gif
Binary file added icons/stax_app_wanchain.gif
Binary file added icons/stax_app_webchain.gif
Binary file added icons/stax_app_wethio.gif
Binary file added icons/stax_app_xdcnetwork.gif
Binary file removed icons/thundercore.png
Diff not rendered.
Binary file removed icons/tobalaba.png
Diff not rendered.
Binary file removed icons/tomochain.png
Diff not rendered.
Binary file removed icons/ubiq.png
Diff not rendered.
Binary file removed icons/volta.png
Diff not rendered.
Binary file removed icons/wanchain.png
Diff not rendered.
Binary file removed icons/webchain.png
Diff not rendered.
1 change: 0 additions & 1 deletion src/common_ui.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ void ui_display_public_eth2(void);
void ui_display_privacy_public_key(void);
void ui_display_privacy_shared_secret(void);
void ui_display_public_key(void);
void ui_display_sign(void);
void ui_sign_712_v0(void);
void ui_display_stark_public(void);
void ui_confirm_selector(void);
Expand Down
7 changes: 5 additions & 2 deletions src/eth_plugin_handler.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,8 @@ void eth_plugin_prepare_query_contract_UI(ethQueryContractUI_t *queryContractUI,
uint32_t titleLength,
char *msg,
uint32_t msgLength) {
uint64_t chain_id;

memset((uint8_t *) queryContractUI, 0, sizeof(ethQueryContractUI_t));

// If no extra information was found, set the pointer to NULL
Expand All @@ -64,7 +66,8 @@ void eth_plugin_prepare_query_contract_UI(ethQueryContractUI_t *queryContractUI,
}

queryContractUI->screenIndex = screenIndex;
strlcpy(queryContractUI->network_ticker, get_network_ticker(), MAX_TICKER_LEN);
chain_id = get_tx_chain_id();
strlcpy(queryContractUI->network_ticker, get_displayable_ticker(&chain_id), MAX_TICKER_LEN);
queryContractUI->title = title;
queryContractUI->titleLength = titleLength;
queryContractUI->msg = msg;
Expand Down Expand Up @@ -149,7 +152,7 @@ eth_plugin_result_t eth_plugin_perform_init(uint8_t *contractAddress,
}

// Do not handle a plugin if running in swap mode
if (called_from_swap && (contractAddress != NULL)) {
if (G_called_from_swap && (contractAddress != NULL)) {
PRINTF("eth_plug_init aborted in swap mode\n");
return 0;
}
Expand Down
1 change: 0 additions & 1 deletion src/eth_plugin_internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

#define SELECTOR_SIZE 4
#define PARAMETER_LENGTH 32
#define RUN_APPLICATION 1

void copy_address(uint8_t* dst, const uint8_t* parameter, uint8_t dst_size);

Expand Down
32 changes: 26 additions & 6 deletions src/handle_swap_sign_transaction.c
Original file line number Diff line number Diff line change
@@ -1,8 +1,15 @@
#include "os_io_seproxyhal.h"
#include "os.h"
#include "ux.h"
#include "handle_swap_sign_transaction.h"
#include "shared_context.h"
#include "utils.h"
#ifdef HAVE_NBGL
#include "nbgl_use_case.h"
#endif // HAVE_NBGL

// Save the BSS address where we will write the return value when finished
static uint8_t* G_swap_sign_return_value_address;

bool copy_transaction_parameters(create_transaction_parameters_t* sign_transaction_params,
chain_config_t* config) {
Expand Down Expand Up @@ -45,14 +52,30 @@ bool copy_transaction_parameters(create_transaction_parameters_t* sign_transacti
stack_data.maxFee,
sizeof(stack_data.maxFee));

// Full reset the global variables
os_explicit_zero_BSS_segment();
// Keep the address at which we'll reply the signing status
G_swap_sign_return_value_address = &sign_transaction_params->result;
// Commit the values read from exchange to the clean global space

memcpy(&strings.common, &stack_data, sizeof(stack_data));
return true;
}

void __attribute__((noreturn)) finalize_exchange_sign_transaction(bool is_success) {
*G_swap_sign_return_value_address = is_success;
os_lib_end();
}

void handle_swap_sign_transaction(chain_config_t* config) {
UX_INIT();
#ifdef HAVE_NBGL
nbgl_useCaseSpinner("Signing");
#endif // HAVE_NBGL

chainConfig = config;
reset_app_context();
called_from_swap = true;
G_called_from_swap = true;
io_seproxyhal_init();

if (N_storage.initialized != 0x01) {
Expand All @@ -65,18 +88,15 @@ void handle_swap_sign_transaction(chain_config_t* config) {
nvm_write((void*) &N_storage, (void*) &storage, sizeof(internalStorage_t));
}

UX_INIT();
USB_power(0);
USB_power(1);
// ui_idle();
PRINTF("USB power ON/OFF\n");
#ifdef TARGET_NANOX
#ifdef HAVE_BLE
// grab the current plane mode setting
G_io_app.plane_mode = os_setting_get(OS_SETTING_PLANEMODE, NULL, 0);
#endif // TARGET_NANOX
#ifdef HAVE_BLE
BLE_power(0, NULL);
BLE_power(1, "Nano X");
BLE_power(1, NULL);
#endif // HAVE_BLE
app_main();
}
5 changes: 2 additions & 3 deletions src/handle_swap_sign_transaction.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#ifndef _HANDLE_SWAP_SIGN_TRANSACTION_H_
#define _HANDLE_SWAP_SIGN_TRANSACTION_H_
#pragma once

#include "swap_lib_calls.h"
#include "chainConfig.h"
Expand All @@ -9,4 +8,4 @@ bool copy_transaction_parameters(create_transaction_parameters_t* sign_transacti

void handle_swap_sign_transaction(chain_config_t* config);

#endif // _HANDLE_SWAP_SIGN_TRANSACTION_H_
void __attribute__((noreturn)) finalize_exchange_sign_transaction(bool is_success);
Loading

0 comments on commit 2264f67

Please sign in to comment.