Skip to content

Commit

Permalink
Fix various Linter issues
Browse files Browse the repository at this point in the history
  • Loading branch information
cedelavergne-ledger committed Mar 19, 2024
1 parent 20a13ce commit 3b588d3
Show file tree
Hide file tree
Showing 84 changed files with 197 additions and 184 deletions.
7 changes: 4 additions & 3 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ Describe your issue in as much detail as possible here.

## Steps to reproduce

* Tell us how to reproduce this issue <br />
* Where the issue is, if you know <br />
* Tell us how to reproduce this issue
* Where the issue is, if you know
* Which commands triggered the issue, if any

## Expected behaviour
Expand All @@ -37,4 +37,5 @@ Please paste any logs here that demonstrate the issue, if they exist

## Proposed solution

If you have an idea of how to fix this issue, please write it down here, so we can begin discussing it
If you have an idea of how to fix this issue, please write it down here,
so we can begin discussing it
2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
---
name: Feature report
about: Suggest an idea for this project
about: Suggest an idea for this project
title: 'Add [Subject of the issue]'
labels: 'enhancement'
assignees: ''
Expand Down
15 changes: 8 additions & 7 deletions .github/ISSUE_TEMPLATE/network_request.md
Original file line number Diff line number Diff line change
@@ -1,19 +1,20 @@
---
name: Network request
about: Request of new chain or network
about: Request of new chain or network
title: 'Add {NameChain} network ({SYMBOL})'
labels: 'enhancement, chain/network'
assignees: ''

---

## Description
- [ ] Symbol:
- [ ] ChainId:
- [ ] Website:
- [ ] Block-Explorer:
- [ ] [slip-0044](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) type:

- [ ] Symbol:
- [ ] ChainId:
- [ ] Website:
- [ ] Block-Explorer:
- [ ] [slip-0044](https://github.com/satoshilabs/slips/blob/master/slip-0044.md) type:

## Additional comments

Please post additional comments in this section if you have them, otherwise delete it.
Please post additional comments in this section if you have them, otherwise delete it.
4 changes: 2 additions & 2 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## Description

Please provide a detailed description of what was done in this PR.
Please provide a detailed description of what was done in this PR.
(And mentioned if linked to an issue [docs](https://docs.github.com/en/issues/tracking-your-work-with-issues/linking-a-pull-request-to-an-issue))

## Changes include
Expand All @@ -18,4 +18,4 @@ Please complete this section if any breaking changes have been made, otherwise d

## Additional comments

Please post additional comments in this section if you have them, otherwise delete it.
Please post additional comments in this section if you have them, otherwise delete it.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,4 @@ tests/elfs/*
tests/snapshots-tmp

.vscode
.idea
.idea
62 changes: 34 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,11 @@
- [Update binaries](#update-binaries)
- [Contributing](#contributing)


</details>

## About the project

Ethereum wallet application framework for Nano S, Nano S Plus 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 All @@ -53,8 +52,9 @@ To compile it and load it on a device, please check out our [developer portal](h

### Plugins

We have the concept of plugins in the ETH app.
Find the documentations here:
We have the concept of plugins in the ETH app.
Find the documentations here:

- [Blog Ethereum plugins](https://blog.ledger.com/ethereum-plugins/)
- [Ethereum application Plugins : Technical Specifications](https://github.com/LedgerHQ/app-ethereum/blob/master/doc/ethapp_plugins.asc)
- [Plugin guide](https://hackmd.io/300Ukv5gSbCbVcp3cZuwRQ)
Expand All @@ -70,46 +70,53 @@ Testing is done via the open-source framework [zemu](https://github.com/Zondax/z
- [yarn](https://classic.yarnpkg.com/lang/en/docs/install/#debian-stable)
- [build environment](https://github.com/LedgerHQ/ledger-app-builder/blob/master/Dockerfile)

#### Build the applications required by the test suite
#### Build the applications required by the test suite

1. Add your BOLOS SDKs path to:
- `NANOS_SDK` and `NANOX_SDK`

`NANOS_SDK` and `NANOX_SDK`

2. Go to the `tests` folder and run `./build_local_test_elfs.sh`
- ```sh
cd tests
# This helper script will build the applications required by the test suite and move them at the right place.
yarn install
./build_local_test_elfs.sh
```

```sh
cd tests
# This helper script will build the applications required by the test suite and move them at the right place.
yarn install
./build_local_test_elfs.sh
```

### Running all tests

#### With Makefile

1. Then you can install and run tests by simply running on the `root` of the repo:
- ```sh
make test
```
- This will run `make install_tests` and `make run_tests`

```sh
make test
# This will run `make install_tests` and `make run_tests`
```

#### With yarn

1. Go to the `tests` folder and run:
- ```sh
yarn test
```

```sh
yarn test
```

### Running a specific tests

1. Go to the `tests` folder and run:
- ```sh
yarn jest --runInBand --detectOpenHandles {YourTestFile}
```
2. For example with the `send test`:
- ```sh
yarn jest --runInBand --detectOpenHandles src/send.test.js
```
1. Go to the `tests` folder and run:

```sh
yarn jest --runInBand --detectOpenHandles {YourTestFile}
```

2. For example with the `send test`:

```sh
yarn jest --runInBand --detectOpenHandles src/send.test.js
```

### Adding tests

Expand Down Expand Up @@ -142,7 +149,6 @@ cp bin/app.elf tests/elfs/ethereum_nanos.elf

Repeat the operation for a binary compiled with nanoX SDK and change for `ethereum_nanox.elf`.


## Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are **greatly appreciated**.
Expand Down
2 changes: 1 addition & 1 deletion client/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,4 +48,4 @@ Home = "https://github.com/LedgerHQ/app-ethereum"
ignore_missing_imports = true

[tool.flake8]
max-line-length = 120
max-line-length = 120
1 change: 0 additions & 1 deletion doc/eth_contract_support_embedded.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -45,4 +45,3 @@ A UI implementation might want to convert an ERC 20 token contract address to a
2 tickers can be temporarily provisioned to the application by using the PROVIDE ERC 20 TOKEN INFORMATION APDU, described in *src_features/provideErc20TokenInformation* - the UI can then iterate on the provisioned tickers to display relevant information to the user

The same mechanism will be extended to support well known contract addresses in the future

2 changes: 1 addition & 1 deletion examples/signMessageEIP711v0.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ def parse_bip32_path(path):
domainHash = binascii.unhexlify(args.domainHash)
messageHash = binascii.unhexlify(args.messageHash)

encodedTx = domainHash + messageHash
encodedTx = domainHash + messageHash

donglePath = parse_bip32_path(args.path)
apdu = bytearray.fromhex("e00c0000")
Expand Down
2 changes: 1 addition & 1 deletion makefile_conf/chain/akroma.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/200625'"
TICKER = "AKA"
CHAIN_ID = 200625
APPNAME = "Akroma"
APPNAME = "Akroma"
2 changes: 1 addition & 1 deletion makefile_conf/chain/artis_sigma1.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/246529'"
TICKER = "ATS"
CHAIN_ID = 246529
APPNAME = "ARTIS sigma1"
APPNAME = "ARTIS sigma1"
2 changes: 1 addition & 1 deletion makefile_conf/chain/artis_tau1.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/246785'"
TICKER = "ATS"
CHAIN_ID = 246785
APPNAME = "ARTIS tau1"
APPNAME = "ARTIS tau1"
2 changes: 1 addition & 1 deletion makefile_conf/chain/atheios.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/1620'"
TICKER = "ATH"
CHAIN_ID = 1620
APPNAME = "Atheios"
APPNAME = "Atheios"
2 changes: 1 addition & 1 deletion makefile_conf/chain/bsc.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "BNB"
CHAIN_ID = 56
APPNAME = "Binance Smart Chain"
APPNAME = "Binance Smart Chain"
2 changes: 1 addition & 1 deletion makefile_conf/chain/bttc.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "BTT"
CHAIN_ID = 199
APPNAME = "BTTC"
APPNAME = "BTTC"
2 changes: 1 addition & 1 deletion makefile_conf/chain/callisto.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/820'"
TICKER = "CLO"
CHAIN_ID = 820
APPNAME = "Callisto"
APPNAME = "Callisto"
2 changes: 1 addition & 1 deletion makefile_conf/chain/conflux_espace.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "CFX"
CHAIN_ID = 1030
APPNAME = "Conflux eSpace"
APPNAME = "Conflux eSpace"
2 changes: 1 addition & 1 deletion makefile_conf/chain/cube.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "CUBE"
CHAIN_ID = 1818
APPNAME = "Cube"
APPNAME = "Cube"
2 changes: 1 addition & 1 deletion makefile_conf/chain/dexon.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/237'"
TICKER = "DXN"
CHAIN_ID = 237
APPNAME = "DEXON"
APPNAME = "DEXON"
2 changes: 1 addition & 1 deletion makefile_conf/chain/ellaism.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/163'"
TICKER = "ELLA"
CHAIN_ID = 64
APPNAME = "Ellaism"
APPNAME = "Ellaism"
2 changes: 1 addition & 1 deletion makefile_conf/chain/ether1.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/1313114'"
TICKER = "ETHO"
CHAIN_ID = 1313114
APPNAME = "Ether-1"
APPNAME = "Ether-1"
2 changes: 1 addition & 1 deletion makefile_conf/chain/ethereum_classic.mk
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
APP_LOAD_PARAMS += --path "44'/61'" --path "44'/60'"
TICKER = "ETC"
CHAIN_ID = 61
APPNAME = "Ethereum Classic"
APPNAME = "Ethereum Classic"
2 changes: 1 addition & 1 deletion makefile_conf/chain/ethergem.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/1987'"
TICKER = "EGEM"
CHAIN_ID = 1987
APPNAME = "EtherGem"
APPNAME = "EtherGem"
2 changes: 1 addition & 1 deletion makefile_conf/chain/ethersocial.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/31102'"
TICKER = "ESN"
CHAIN_ID = 31102
APPNAME = "Ethersocial"
APPNAME = "Ethersocial"
2 changes: 1 addition & 1 deletion makefile_conf/chain/expanse.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/40'"
TICKER = "EXP"
CHAIN_ID = 2
APPNAME = "Expanse"
APPNAME = "Expanse"
2 changes: 1 addition & 1 deletion makefile_conf/chain/flare.mk
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ CHAIN_ID = 14
APP_LOAD_PARAMS += --tlvraw 9F:01
DEFINES += HAVE_PENDING_REVIEW_SCREEN

APPNAME = "Flare"
APPNAME = "Flare"
2 changes: 1 addition & 1 deletion makefile_conf/chain/flare_coston.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/554'" --path "44'/60'"
TICKER = "FLR"
CHAIN_ID = 16
APPNAME = "Flare Coston"
APPNAME = "Flare Coston"
2 changes: 1 addition & 1 deletion makefile_conf/chain/gochain.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/6060'"
TICKER = "GO"
CHAIN_ID = 60
APPNAME = "GoChain"
APPNAME = "GoChain"
2 changes: 1 addition & 1 deletion makefile_conf/chain/hpb.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/269'"
TICKER = "HPB"
CHAIN_ID = 269
APPNAME = "HPB"
APPNAME = "HPB"
2 changes: 1 addition & 1 deletion makefile_conf/chain/kardiachain.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "KAI"
CHAIN_ID = 24
APPNAME = "KardiaChain"
APPNAME = "KardiaChain"
2 changes: 1 addition & 1 deletion makefile_conf/chain/meter.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "MTR"
CHAIN_ID = 82
APPNAME = "Meter"
APPNAME = "Meter"
2 changes: 1 addition & 1 deletion makefile_conf/chain/mix.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/76'"
TICKER = "MIX"
CHAIN_ID = 76
APPNAME = "Mix"
APPNAME = "Mix"
2 changes: 1 addition & 1 deletion makefile_conf/chain/moonbeam.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'" --path "44'/1284'"
TICKER = "GLMR"
CHAIN_ID = 1284
APPNAME = "Moonbeam"
APPNAME = "Moonbeam"
2 changes: 1 addition & 1 deletion makefile_conf/chain/moonriver.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'" --path "44'/1285'"
TICKER = "MOVR"
CHAIN_ID = 1285
APPNAME = "Moonriver"
APPNAME = "Moonriver"
2 changes: 1 addition & 1 deletion makefile_conf/chain/musicoin.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/184'"
TICKER = "MUSIC"
CHAIN_ID = 7762959
APPNAME = "Musicoin"
APPNAME = "Musicoin"
2 changes: 1 addition & 1 deletion makefile_conf/chain/okc.mk
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
APP_LOAD_PARAMS += --path "44'/60'"
TICKER = "OKT"
CHAIN_ID = 66
APPNAME = "OKXChain"
APPNAME = "OKXChain"
Loading

0 comments on commit 3b588d3

Please sign in to comment.