Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 0 additions & 24 deletions .circleci/config.yml

This file was deleted.

1 change: 0 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@
"import/newline-after-import": "warn",
"import/no-dynamic-require": "warn",
"import/prefer-default-export": "warn",
"jest/no-disabled-tests": "warn",
"jsx-a11y/click-events-have-key-events": "warn",
"jsx-a11y/interactive-supports-focus": "warn",
"jsx-a11y/label-has-for": "warn",
Expand Down
13 changes: 9 additions & 4 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,19 @@ Extract only when it clearly reduces duplication, improves readability, isolates

## Task Completion Requirements

Run commands from the repo `root` with **yarn**.
Run commands from the repo `root` with **yarn**, on the Node version pinned in `.nvmrc` (`nvm use`).

- `yarn lint`, `yarn test`, `yarn build`, `yarn package-win-local`, and `yarn dev` must pass before considering tasks completed.
- `yarn lint`, `yarn build`, `yarn package-win-local`, and `yarn dev` must pass before considering tasks completed.
- `yarn lint` — ESLint.
- `yarn test` — Jest tests.
- `yarn build` — Production builds.
- `yarn package-win-local` — Windows local build.
- `yarn package-win-local` — Windows local build. **Run this on Windows.** Windows packaging cannot be
cross-compiled from macOS or Linux: `node-hid` ships `pkg-prebuilds` binaries that `@electron/rebuild`
does not recognise, so it attempts a node-gyp source build and fails on a non-Windows host. Building on
Windows also means the Ledger HID/USB native modules that ship are the ones actually exercised.
- `yarn dev` — Development server.
- Use `yarn lint-fix` to apply ESLint fixes when formatting fixes are needed.

There is no automated test suite. The Jest/Enzyme suite dated from 2019, stopped being run when CI broke,
and was removed in full. Verify changes by building and exercising the app.

Make sure to stop the development server after you're done.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ When downloading from either location, check the URL bar of your browser to ensu

### Current Release

The most recent (v1.4.0-beta.1) release can downloaded using these links:
The most recent (v1.4.0-beta.2) release can downloaded using these links:

- [Windows Installer](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.1/win-anchor-wallet-1.4.0-beta.1.exe)
- [macOS Package](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.1/mac-anchor-wallet-1.4.0-beta.1-x64.dmg)
- [Linux (deb)](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.1/linux-anchor-wallet-1.4.0-beta.1-amd64.deb)
- [Linux (AppImage)](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.1/linux-anchor-wallet-1.4.0-beta.1-x86_64.AppImage)
- [Windows Installer](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.2/win-anchor-wallet-1.4.0-beta.2.exe)
- [macOS Package](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.2/mac-anchor-wallet-1.4.0-beta.2-x64.dmg)
- [Linux (deb)](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.2/linux-anchor-wallet-1.4.0-beta.2-amd64.deb)
- [Linux (AppImage)](https://github.com/greymass/anchor/releases/download/v1.4.0-beta.2/linux-anchor-wallet-1.4.0-beta.2-x86_64.AppImage)

The latest release will always be available on the releases page of this repository:

Expand Down
1 change: 0 additions & 1 deletion app/.eslintrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
{
"extends": ["plugin:jest/recommended"],
"rules": {
"flowtype/boolean-style": ["error", "boolean"],
"flowtype/define-flow-type": "warn",
Expand Down
18 changes: 16 additions & 2 deletions app/main/main.dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ app.on('open-url', (e, url) => {
app.on('before-quit', () => {
log.info('anchor: before-quit');
if (initHardwareRetry) {
clearInterval(initHardwareRetry);
clearTimeout(initHardwareRetry);
}
if (sHandler && sHandler.manager) {
sHandler.manager.disconnect();
Expand Down Expand Up @@ -213,6 +213,10 @@ const showManager = () => {

let initHardwareRetry;
let initHardwareOpening = false;
let initHardwareAttempts = 0;
// Bound the reconnect loop. A failed open leaks the underlying HID handle until GC
// reclaims it, so retrying forever keeps the device permanently busy.
const initHardwareMaxAttempts = 15;

// Lock to prevent multiple session handlers from starting at once
let initializingSessionManager = false;
Expand Down Expand Up @@ -245,6 +249,10 @@ const initHardwareLedger = (e, signPath, devicePath) => {
clearTimeout(initHardwareRetry);
initHardwareRetry = null;
}
// A request originating from the renderer is user initiated, so restart the retry budget.
if (e) {
initHardwareAttempts = 0;
}
// Reopening a HID device that already holds an open handle fails; treat as connected.
if (global.hardwareLedger && global.hardwareLedger.transport) {
log.info('initHardwareLedger: transport already open, refreshing app configuration');
Expand All @@ -260,6 +268,7 @@ const initHardwareLedger = (e, signPath, devicePath) => {
Transport.open(devicePath)
.then(transport => {
log.info('initHardwareLedger: hardware ledger transport success');
initHardwareAttempts = 0;
if (process.env.NODE_ENV === 'development') {
transport.setDebugMode(true);
}
Expand All @@ -277,7 +286,12 @@ const initHardwareLedger = (e, signPath, devicePath) => {
})
.catch(error => {
log.info(`initHardwareLedger: hardware ledger transport failure ${error}`);
initHardwareRetry = setTimeout(() => initHardwareLedger(false, signPath, devicePath), 2000);
initHardwareAttempts += 1;
if (initHardwareAttempts < initHardwareMaxAttempts) {
initHardwareRetry = setTimeout(() => initHardwareLedger(false, signPath, devicePath), 2000);
} else {
log.info(`initHardwareLedger: giving up after ${initHardwareAttempts} attempts`);
}
store.dispatch({
payload: {
error,
Expand Down
6 changes: 3 additions & 3 deletions app/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "anchor-wallet",
"productName": "Anchor Wallet",
"version": "1.4.0-beta.1",
"version": "1.4.0-beta.2",
"description": "An Antelope Light Wallet with simple tools for basic activities and advanced tools for power users.",
"main": "./main.prod.js",
"author": {
Expand All @@ -16,13 +16,13 @@
"license": "MIT",
"dependencies": {
"@babel/core": "^7.14.8",
"@ledgerhq/hw-transport-node-hid": "6.6.0"
"@ledgerhq/hw-transport-node-hid": "6.33.5"
},
"devDependencies": {
"@babel/register": "^7.15.3"
},
"resolutions": {
"node-hid": "3.3.0",
"usb": "1.7.2"
"usb": "2.9.0"
}
}
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/de-DE/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Block Height",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/el-GR/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Block Height",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/en-US/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Block Height",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/es-ES/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Atrás",
"block_height": "Altura del bloque",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/et-EE/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Tagasi",
"block_height": "Ploki kõrgus",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/fr-FR/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Hauteur du Bloc",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/id-ID/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Kembali",
"block_height": "Tinggi Block",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/it-IT/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Numero di Blocco",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ja-JP/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "戻る",
"block_height": "ブロック高",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ko-KR/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "뒤로",
"block_height": "블록 높이",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/ru-RU/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Настольное приложение для блокцепи EOS (Anchor)",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "Номер Блока",
"blockchain": "Blockchain",
Expand Down
2 changes: 1 addition & 1 deletion app/renderer/assets/locales/zh-CN/common.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"account_authority": "Account/Authority",
"application_name": "Anchor",
"application_version": "v1.4.0-beta.1",
"application_version": "v1.4.0-beta.2",
"back": "Back",
"block_height": "区块高度",
"blockchain": "Blockchain",
Expand Down
95 changes: 0 additions & 95 deletions app/shared/actions/accounts.test.js

This file was deleted.

Loading