Skip to content

Commit cca7db4

Browse files
🔖 (release) [NO-ISSUE]: New release incoming: Signer SOL 1.6.1, Signer ETH 1.10.0, Context Module 1.13.0, Signer BTC 1.2.0, DMK 1.0.1, Speculos Device Controller 0.2.3 (#1260)
2 parents 9c23c1c + 9790abb commit cca7db4

187 files changed

Lines changed: 5482 additions & 1805 deletions

File tree

Some content is hidden

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

.cursor/commands/changeset.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# changeset
2+
3+
refer to .cursor/rules/changeset.mdc

.cursor/commands/commit.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# commit
2+
3+
refer to .cursor/rules/commit.mdc

.cursor/rules/changeset.mdc

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
description: How to create a changeset
3+
alwaysApply: false
4+
---
5+
6+
## How to create a changeset
7+
8+
To create an effective changeset in this repo, follow these guidelines:
9+
10+
1. Run `pnpm changeset add --empty` to generate an empty changeset file.
11+
2. In the newly created file:
12+
- Specify the affected package name(s).
13+
- Choose the correct version bump type:
14+
- **Major:** Breaking changes (use only when explicitly required).
15+
- **Minor:** New features, additions, or improvements.
16+
- **Patch:** Bug fixes or minor, non-breaking modifications.
17+
3. Write a short, clear summary describing the purpose of the changeset.
18+
19+
## Additional Rules:
20+
21+
- Prefer a single changeset per package per PR, unless there are distinct, unrelated changes.
22+
- It is acceptable to use multiple changesets for a single package when necessary (e.g., logically separate changes).
23+
- Each changeset should be concise and focused on a specific purpose.
24+
- Avoid creating unnecessary or duplicate changesets.
25+
26+
When in doubt, consult the team or existing changeset history for examples.

.cursor/rules/commit.mdc

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
---
2+
description: How to create a commit
3+
alwaysApply: false
4+
---
5+
6+
## How to commit
7+
8+
We use [gitmoji](https://gitmoji.dev/) for commit messages to standardize and improve readability.
9+
10+
### Commit message rules
11+
12+
The rules are enforced by the `danger` CI bot. Make sure each commit message follows **all** of these requirements:
13+
14+
- **Start with a [gitmoji](https://gitmoji.dev/)** (which can be viewed with `pnpm gitmoji --list`)
15+
- Follow with a **space**
16+
- Specify a **scope** in parentheses, all in **lowercase**
17+
Example:
18+
- `(signer-eth)`
19+
- `(context-module)`
20+
- `(chore)`
21+
- `(release)`
22+
- `(ci)`
23+
- Do **not** repeat JIRA ticket tags (e.g. `[DSDK-1234]`, `[NO-ISSUE]`) in your commit message—these tags are optional for commits and required in PR titles.
24+
- Add a **colon `:` and a space**
25+
- Write a message that **starts with a capital letter**
26+
27+
**Pattern:**
28+
29+
```
30+
<gitmoji> (scope): Description starting with capital letter
31+
```
32+
33+
**Examples:**
34+
35+
- `💚 (api): Add new endpoint`
36+
- `✨ (cli): Support new flags`
37+
- `🐛 (parser): Fix buffer overflow`
38+
39+
**Special notes:**
40+
41+
If you're unsure which gitmoji to use, you can list all available emojis with:
42+
43+
```
44+
pnpm gitmoji --list
45+
```
46+
47+
You can also see commit message examples by running:
48+
49+
```
50+
git log --oneline
51+
```
52+
53+
Refer to these resources to help you select appropriate emojis and follow the commit convention.
54+
55+
For more details or troubleshooting, see [CONTRIBUTING.md](https://github.com/LedgerHQ/device-sdk-ts/blob/develop/CONTRIBUTING.md).
56+
57+
Commits that don't follow this convention will fail CI and block merging.

.github/workflows/erc7730_nightly.yml

Lines changed: 44 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -4,22 +4,6 @@ on:
44
# Run every day at 2:00 AM UTC
55
- cron: "0 2 * * *"
66
workflow_dispatch:
7-
inputs:
8-
device:
9-
description: "Device to test"
10-
required: false
11-
default: "stax"
12-
type: choice
13-
options:
14-
- stax
15-
- nanox
16-
- nanos+
17-
- flex
18-
provider:
19-
description: "Provider to test (leave empty for all)"
20-
required: false
21-
default: ""
22-
type: string
237

248
env:
259
FORCE_COLOR: "1"
@@ -50,40 +34,38 @@ jobs:
5034
- uses: LedgerHQ/device-sdk-ts/.github/actions/setup-with-build-cache-composite@develop
5135

5236
erc7730-tests:
53-
name: ERC7730 (${{ matrix.device }} - ${{ matrix.provider }}${{ matrix.chain && format(' {0}', matrix.chain) || '' }})
37+
name: ERC7730 Tests (${{ matrix.device }} - ${{ matrix.include_dapp.dapp }})
5438
needs: [build-libraries]
5539
runs-on: ledgerhq-device-sdk
5640
strategy:
41+
fail-fast: false
5742
matrix:
5843
device:
5944
- stax
6045
- nanox
61-
- nanos+
6246
- flex
63-
include_provider:
64-
- provider: "1inch"
47+
include_dapp:
48+
- dapp: "1inch"
6549
chain: ""
66-
- provider: "1inch"
67-
chain: "arbitrum"
68-
- provider: "aave"
50+
- dapp: "aave"
6951
chain: ""
70-
- provider: "ethena"
52+
- dapp: "ethena"
7153
chain: ""
72-
- provider: "lido"
54+
- dapp: "lido"
7355
chain: ""
74-
- provider: "lombard"
56+
- dapp: "lombard"
7557
chain: ""
76-
- provider: "poap"
58+
- dapp: "poap"
7759
chain: ""
78-
- provider: "swissborg"
60+
- dapp: "swissborg"
7961
chain: ""
80-
- provider: "tether"
62+
- dapp: "tether"
8163
chain: ""
82-
- provider: "uniswap"
64+
- dapp: "uniswap"
8365
chain: ""
84-
- provider: "velora"
66+
- dapp: "velora"
8567
chain: ""
86-
- provider: "yieldxyz"
68+
- dapp: "yieldxyz"
8769
chain: ""
8870
steps:
8971
- uses: actions/checkout@v6
@@ -92,10 +74,12 @@ jobs:
9274

9375
- name: Generate token
9476
id: generate-token
95-
uses: tibdex/github-app-token@v2
77+
uses: actions/create-github-app-token@v2
9678
with:
97-
app_id: ${{ secrets.GH_BOT_APP_ID }}
98-
private_key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
79+
app-id: ${{ secrets.GH_BOT_APP_ID }}
80+
private-key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
81+
owner: LedgerHQ
82+
repositories: coin-apps
9983

10084
- name: Retrieving coin apps
10185
uses: actions/checkout@v6
@@ -114,21 +98,39 @@ jobs:
11498
- name: Run ERC7730 Test
11599
id: erc7730-test
116100
env:
101+
FORCE_COLOR: "0"
117102
GATING_TOKEN: ${{ secrets.GATING_TOKEN }}
118103
COIN_APPS_PATH: "${{ github.workspace }}/coin-apps"
119104
run: |
120-
mkdir -p logs/screenshots
121-
pnpm cs-tester test:erc7730 ${{ matrix.include_provider.provider }} ${{ matrix.include_provider.chain }} \
105+
set -o pipefail
106+
mkdir -p /tmp/logs/screenshots
107+
pnpm cs-tester test:erc7730 ${{ matrix.include_dapp.dapp }} ${{ matrix.include_dapp.chain }} \
122108
--device ${{ matrix.device }} \
123109
--log-level error \
124-
--log-file "logs/erc7730-${{ matrix.include_provider.provider }}-${{ matrix.include_provider.chain }}.log" \
110+
--log-file "/tmp/logs/erc7730-${{ matrix.include_dapp.dapp }}.log" \
125111
--file-log-level debug \
126-
--screenshot-folder-path "logs/screenshots"
112+
--screenshot-folder-path "/tmp/logs/screenshots" \
113+
2>&1 | tee /tmp/cs-tester-output.log
114+
115+
- name: Write job summary
116+
if: always()
117+
run: |
118+
echo "## 🧪 ERC7730 Test Results (${{ matrix.device }} - ${{ matrix.include_dapp.dapp }})" >> $GITHUB_STEP_SUMMARY
119+
echo "" >> $GITHUB_STEP_SUMMARY
120+
if [ -f /tmp/cs-tester-output.log ]; then
121+
echo '```' >> $GITHUB_STEP_SUMMARY
122+
sed -n '/📋/,/^└/p' /tmp/cs-tester-output.log >> $GITHUB_STEP_SUMMARY
123+
echo "" >> $GITHUB_STEP_SUMMARY
124+
sed -n '/📊/,/^└/p' /tmp/cs-tester-output.log >> $GITHUB_STEP_SUMMARY
125+
echo '```' >> $GITHUB_STEP_SUMMARY
126+
else
127+
echo "⚠️ No test output available" >> $GITHUB_STEP_SUMMARY
128+
fi
127129
128130
- name: Upload logs
129131
if: always()
130-
uses: actions/upload-artifact@v4
132+
uses: actions/upload-artifact@v6
131133
with:
132-
name: erc7730-logs-${{ matrix.device }}-${{ matrix.include_provider.provider }}${{ matrix.include_provider.chain && format('-{0}', matrix.include_provider.chain) || '' }}
133-
path: logs/
134+
name: erc7730-logs-${{ matrix.device }}-${{ matrix.include_dapp.dapp }}
135+
path: /tmp/logs/
134136
retention-days: 7

.github/workflows/pull_request.yml

Lines changed: 26 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,7 @@ jobs:
4747
- 'packages/signer/signer-eth/**'
4848
cs-tester:
4949
- 'apps/clear-signing-tester/**'
50+
- '.github/**'
5051
5152
setup:
5253
name: Setup toolchain and dependencies
@@ -143,10 +144,13 @@ jobs:
143144

144145
- name: Generate token
145146
id: generate-token
146-
uses: tibdex/github-app-token@v2
147+
uses: actions/create-github-app-token@v2
147148
with:
148-
app_id: ${{ secrets.GH_BOT_APP_ID }}
149-
private_key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
149+
app-id: ${{ secrets.GH_BOT_APP_ID }}
150+
private-key: ${{ secrets.GH_BOT_PRIVATE_KEY }}
151+
owner: LedgerHQ
152+
repositories: coin-apps
153+
150154
- name: Retrieving coin apps
151155
uses: actions/checkout@v6
152156
with:
@@ -164,6 +168,24 @@ jobs:
164168
- name: Run Clear Signing Tester
165169
id: cs-tester
166170
env:
171+
FORCE_COLOR: "0"
167172
GATING_TOKEN: ${{ secrets.GATING_TOKEN }}
168173
COIN_APPS_PATH: "${{ github.workspace }}/coin-apps"
169-
run: pnpm cs-tester ${{ matrix.test }} --device ${{ matrix.device }}
174+
run: |
175+
set -o pipefail
176+
pnpm cs-tester ${{ matrix.test }} --device ${{ matrix.device }} 2>&1 | tee /tmp/cs-tester-output.log
177+
178+
- name: Write job summary
179+
if: always()
180+
run: |
181+
echo "## 🧪 Clear Signing Tester Results (${{ matrix.device }} - ${{ matrix.test }})" >> $GITHUB_STEP_SUMMARY
182+
echo "" >> $GITHUB_STEP_SUMMARY
183+
if [ -f /tmp/cs-tester-output.log ]; then
184+
echo '```' >> $GITHUB_STEP_SUMMARY
185+
sed -n '/📋/,/^└/p' /tmp/cs-tester-output.log >> $GITHUB_STEP_SUMMARY
186+
echo "" >> $GITHUB_STEP_SUMMARY
187+
sed -n '/📊/,/^└/p' /tmp/cs-tester-output.log >> $GITHUB_STEP_SUMMARY
188+
echo '```' >> $GITHUB_STEP_SUMMARY
189+
else
190+
echo "⚠️ No test output available" >> $GITHUB_STEP_SUMMARY
191+
fi

.prototools

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
node = "20.19.6"
22
npm = "11.7.0"
3-
pnpm = "10.26.2"
3+
pnpm = "10.28.0"

apps/clear-signing-tester/scripts/test-erc7730.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,4 +25,4 @@ if [ ! -f "$TEST_FILE" ]; then
2525
exit 1
2626
fi
2727

28-
pnpm cs-tester cli raw-file $TEST_FILE $ARGUMENTS
28+
(cd $ROOT_PATH && pnpm cli raw-file $TEST_FILE $ARGUMENTS)

apps/clear-signing-tester/src/infrastructure/adapters/device-controllers/SpeculosTouchscreenController.ts

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ import { TYPES } from "@root/src/di/types";
99
import { DeviceController } from "@root/src/domain/adapters/DeviceController";
1010
import { type SpeculosConfig } from "@root/src/domain/models/config/SpeculosConfig";
1111

12+
const DEFAULT_DELAY_MS = 5000;
13+
const FLEX_DELAY_MS = 10000;
14+
1215
/**
1316
* Speculos Touchscreen Device Controller
1417
*
@@ -20,6 +23,7 @@ import { type SpeculosConfig } from "@root/src/domain/models/config/SpeculosConf
2023
export class SpeculosTouchscreenController implements DeviceController {
2124
private readonly logger: LoggerPublisherService;
2225
private readonly tap: ReturnType<DeviceControllerClient["tapFactory"]>;
26+
private readonly delayMs: number;
2327

2428
constructor(
2529
@inject(TYPES.SpeculosConfig) config: SpeculosConfig,
@@ -33,6 +37,8 @@ export class SpeculosTouchscreenController implements DeviceController {
3337
const client = deviceControllerClientFactory(speculosUrl);
3438
this.tap = client.tapFactory(config.device);
3539

40+
this.delayMs = config.device === "flex" ? FLEX_DELAY_MS : DEFAULT_DELAY_MS;
41+
3642
this.logger.info(`Initialized touchscreen controller for ${config.device}`);
3743
}
3844

@@ -41,7 +47,7 @@ export class SpeculosTouchscreenController implements DeviceController {
4147
*/
4248
async signTransaction(): Promise<void> {
4349
this.logger.debug("☝️ (touch) : Performing transaction sign");
44-
await this.tap.sign();
50+
await this.tap.sign(this.delayMs);
4551
}
4652

4753
/**

apps/clear-signing-tester/src/infrastructure/service-controllers/DMKServiceController.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ export class DMKServiceController implements ServiceController {
6262
this.dmk = dmkBuilder.build();
6363
this.contextModule = new ContextModuleBuilder({
6464
originToken: this.signerConfig.originToken,
65+
loggerFactory: (tag: string) =>
66+
this.dmk.getLoggerFactory()(["ContextModule", tag]),
6567
})
6668
.setDatasourceConfig({ proxy: "safe" })
6769
.setCalConfig(this.calConfig)

0 commit comments

Comments
 (0)