From 324f66c48cff7bef3e44a64b0b9a93da8cd05f6e Mon Sep 17 00:00:00 2001
From: Alberto Nicolas Penayo <74352651+bee344@users.noreply.github.com>
Date: Mon, 29 Jul 2024 14:24:51 -0300
Subject: [PATCH] feat: add support for Ledger Migration App (#1422)
* added warning
* linting
---
packages/extension-base/package.json | 4 +-
packages/extension-ui/package.json | 8 +--
.../src/Popup/Signing/LedgerSign.tsx | 6 ++
packages/extension-ui/src/Popup/index.tsx | 6 +-
packages/extension-ui/src/hooks/useLedger.ts | 13 ++++
packages/extension-ui/src/i18n/i18n.ts | 4 +-
.../src/partials/MenuSettings.tsx | 19 ++++++
.../public/locales/en/translation.json | 3 +-
yarn.lock | 60 +++++++++----------
9 files changed, 81 insertions(+), 42 deletions(-)
diff --git a/packages/extension-base/package.json b/packages/extension-base/package.json
index ef344e07..a669c8d3 100644
--- a/packages/extension-base/package.json
+++ b/packages/extension-base/package.json
@@ -30,8 +30,8 @@
"@polkadot/phishing": "^0.23.1",
"@polkadot/rpc-provider": "^12.2.1",
"@polkadot/types": "^12.2.1",
- "@polkadot/ui-keyring": "^3.7.1",
- "@polkadot/ui-settings": "^3.7.1",
+ "@polkadot/ui-keyring": "^3.8.2",
+ "@polkadot/ui-settings": "^3.8.2",
"@polkadot/util": "^13.0.2",
"@polkadot/util-crypto": "^13.0.2",
"eventemitter3": "^5.0.1",
diff --git a/packages/extension-ui/package.json b/packages/extension-ui/package.json
index c4aefd0a..0c671541 100644
--- a/packages/extension-ui/package.json
+++ b/packages/extension-ui/package.json
@@ -32,12 +32,12 @@
"@polkadot/hw-ledger": "^13.0.2",
"@polkadot/keyring": "^13.0.2",
"@polkadot/networks": "^13.0.2",
- "@polkadot/react-identicon": "^3.7.1",
- "@polkadot/react-qr": "^3.7.1",
+ "@polkadot/react-identicon": "^3.8.2",
+ "@polkadot/react-qr": "^3.8.2",
"@polkadot/types": "^12.2.1",
"@polkadot/types-augment": "^12.2.1",
- "@polkadot/ui-keyring": "^3.7.1",
- "@polkadot/ui-settings": "^3.7.1",
+ "@polkadot/ui-keyring": "^3.8.2",
+ "@polkadot/ui-settings": "^3.8.2",
"@polkadot/util": "^13.0.2",
"@polkadot/util-crypto": "^13.0.2",
"file-saver": "^2.0.5",
diff --git a/packages/extension-ui/src/Popup/Signing/LedgerSign.tsx b/packages/extension-ui/src/Popup/Signing/LedgerSign.tsx
index 6322143a..14e70815 100644
--- a/packages/extension-ui/src/Popup/Signing/LedgerSign.tsx
+++ b/packages/extension-ui/src/Popup/Signing/LedgerSign.tsx
@@ -9,6 +9,7 @@ import { faSync } from '@fortawesome/free-solid-svg-icons';
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome';
import React, { useCallback, useEffect, useState } from 'react';
+import settings from '@polkadot/ui-settings';
import { assert, objectSpread, u8aToHex } from '@polkadot/util';
import { merkleizeMetadata } from '@polkadot-api/merkleize-metadata';
@@ -119,6 +120,11 @@ function LedgerSign ({ accountIndex, addressOffset, className, error, genesisHas
{error}
)}
+ {
+
+ {`You are using the Ledger ${settings.ledgerApp.toUpperCase()} App. If you would like to switch it, please go to "MANAGE LEDGER APP" in the extension's settings.`}
+
+ }
{(ledgerLocked || error)
? (