Skip to content

Commit

Permalink
Refactoring + new tasks.
Browse files Browse the repository at this point in the history
  • Loading branch information
agrojean-ledger committed Jul 10, 2023
1 parent 69fe922 commit ca958f2
Show file tree
Hide file tree
Showing 6 changed files with 211 additions and 256 deletions.
14 changes: 14 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [0.1.0]

### Changed

- Code refactoring.

### Added

- New tasks :
- Run app in Speculos,
- Kill Speculos,
- On device functional tests,
- Device quick onboarding.

## [0.0.6]

### Fixed
Expand Down
9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,15 @@ This extension contributes the following settings:

## Release Notes

### 0.1.0

* Code refactoring.
* New tasks :
* Run app in Speculos,
* Kill Speculos,
* On device functional tests,
* Device quick onboarding.

### 0.0.6

Fixes app detection for Windows.
Expand Down
12 changes: 11 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "ledger-dev-tools",
"displayName": "ledger-dev-tools",
"description": "Tools to accelerate development of apps for Ledger devices.",
"version": "0.0.6",
"version": "0.1.0",
"publisher": "LedgerHQ",
"license": "Apache",
"icon": "resources/ledger-square.png",
Expand Down Expand Up @@ -75,6 +75,16 @@
"type": "string",
"default": "ghcr.io/ledgerhq/ledger-app-builder/ledger-app-dev-tools:latest",
"description": "Ledger developer tools Docker image."
},
"ledgerDevTools.onboardingPin": {
"type": "string",
"default": "1234",
"description": "Device quick onboarding default PIN."
},
"ledgerDevTools.onboardingSeed": {
"type": "string",
"default": "glory promote mansion idle axis finger extra february uncover one trip resource lawn turtle enact monster seven myth punch hobby comfort wild raise skin",
"markdownDescription": "Device quick onboarding default 24-word Seed phrase."
}
}
}
Expand Down
10 changes: 9 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export function activate(context: vscode.ExtensionContext) {
let statusBarManager = new StatusBarManager();
statusBarManager.autoUpdateDevImageItem();

let treeProvider = new TreeDataProvider();
let treeProvider = new TreeDataProvider(taskProvider.getTaskSpecs());
vscode.window.registerTreeDataProvider("exampleView", treeProvider);

context.subscriptions.push(
Expand All @@ -49,6 +49,14 @@ export function activate(context: vscode.ExtensionContext) {
if (taskName.startsWith("Run dev-tools image")) {
statusBarManager.updateDevImageItem(DevImageStatus.syncing);
}
if (taskName.startsWith("Quick device onboarding")) {
const conf = vscode.workspace.getConfiguration("ledgerDevTools");
const seedValue = conf.get<string>("onboardingSeed");
const defaultSeed = conf.inspect<string>("onboardingSeed")?.defaultValue;
if (seedValue === defaultSeed) {
vscode.window.showWarningMessage("Do not use default onboarding seed with real funds !");
}
}
});

vscode.tasks.onDidEndTask((event) => {
Expand Down
Loading

0 comments on commit ca958f2

Please sign in to comment.