Skip to content
This repository has been archived by the owner on Jun 16, 2022. It is now read-only.

Commit

Permalink
Merge branch 'release/2.41.x'
Browse files Browse the repository at this point in the history
* release/2.41.x: (56 commits)
  v2.41.3
  Fix NFT send making the app crash in prod (again) (#4958)
  v2.41.2
  Update to LLC 22.0.3
  FIX LIVE-2186 - Fix NFT crashing the app on send (#4953)
  Remove @ledgerhq/ledger-core again after bad merge (#4951)
  Update to temp LLC dependency + @LedgerHQ libs
  FIX LIVE-2176 - Fix NFT Crumb (#4950)
  v2.41.1
  Update LLC dependency
  LIVE-2080 Fixing Flowtype issues being wrongly ignored (#4938)
  v2.41.0
  update screenshots (windows)
  update screenshots (linux)
  New Crowdin updates (#4913)
  Add LLC#22.0.1 dependency
  Update links to use the new explorer from metadata (#4912)
  Bugfix: Solana linting (#4902)
  [LIVE-1911] Feature - Add collection name resolver to eth familly (#4899)
  LIVE-1751 Solana staking (#4884)
  ...
  • Loading branch information
valpinkman committed May 3, 2022
2 parents 369f03b + 0e6dfb2 commit c2ce96d
Show file tree
Hide file tree
Showing 253 changed files with 7,416 additions and 1,123 deletions.
6 changes: 6 additions & 0 deletions .env.production
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FIREBASE_API_KEY="AIzaSyAzrQM75b6VXVwRzEDAM12ijfeOHlXvhA8"
FIREBASE_AUTH_DOMAIN="ledger-live-production.firebaseapp.com"
FIREBASE_PROJECT_ID="ledger-live-production"
FIREBASE_STORAGE_BUCKET="ledger-live-production.appspot.com"
FIREBASE_MESSAGING_SENDER_ID="212042068804"
FIREBASE_APP_ID="1:212042068804:web:268d6f11671689c0b51d11"
6 changes: 6 additions & 0 deletions .env.staging
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FIREBASE_API_KEY="AIzaSyCqosqFLVHMsMi3uOFFbCJItOby7i6Y4T8"
FIREBASE_AUTH_DOMAIN="ledger-live-staging.firebaseapp.com"
FIREBASE_PROJECT_ID="ledger-live-staging"
FIREBASE_STORAGE_BUCKET="ledger-live-staging.appspot.com"
FIREBASE_MESSAGING_SENDER_ID="1008987457941"
FIREBASE_APP_ID="1:1008987457941:web:14f6fbee631e0438d6ce9c"
6 changes: 6 additions & 0 deletions .env.testing
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
FIREBASE_API_KEY="AIzaSyC_VaGrLWspK6OHTOY_EZxjnAYTdw2k7tg"
FIREBASE_AUTH_DOMAIN="ledger-live-testing.firebaseapp.com"
FIREBASE_PROJECT_ID="ledger-live-testing"
FIREBASE_STORAGE_BUCKET="ledger-live-testing.appspot.com"
FIREBASE_MESSAGING_SENDER_ID="677185650562"
FIREBASE_APP_ID="1:677185650562:web:763cd3f1fa0b67781c199b"
6 changes: 3 additions & 3 deletions .github/workflows/generate-screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ jobs:
- name: install operating system dependencies
run: npx playwright install-deps
- name: build electron app
run: yarn build
run: yarn build:testing
- name: generate new screenshots (Linux)
run: xvfb-run --auto-servernum -- yarn playwright-update-snapshots --retries 0
- name: status
Expand Down Expand Up @@ -175,7 +175,7 @@ jobs:
- name: install operating system dependencies
run: npx playwright install-deps
- name: build electron app
run: yarn build
run: yarn build:testing
- name: generate new screenshots (windows)
run: yarn playwright-update-snapshots --retries 0
- name: status
Expand Down Expand Up @@ -218,7 +218,7 @@ jobs:
# - name: install operating system dependencies
# run: npx playwright install-deps
# - name: build electron app
# run: yarn build
# run: yarn build:testing
# - name: generate new screenshots (macOS)
# run: yarn playwright-update-snapshots --retries 0
# - name: status
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/ui-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ jobs:
- name: build electron app
env:
INSTRUMENT_BUILD: true
run: yarn build
run: yarn build:testing
- name: run ui tests (Linux)
if: always()
run: xvfb-run --auto-servernum -- yarn playwright
Expand Down Expand Up @@ -293,7 +293,7 @@ jobs:
- name: build electron app
env:
INSTRUMENT_BUILD: true
run: yarn build
run: yarn build:testing
- name: run ui tests (windows)
run: yarn playwright
- name: upload diffs to imgur
Expand Down Expand Up @@ -344,7 +344,7 @@ jobs:
# - name: build electron app
# env:
# INSTRUMENT_BUILD: true
# run: yarn build
# run: yarn build:testing
# - name: run ui tests (macos)
# run: yarn playwright
# - name: upload diffs to imgur
Expand Down
65 changes: 45 additions & 20 deletions cryptoassets.md

Large diffs are not rendered by default.

19 changes: 10 additions & 9 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,12 @@
"license": "MIT",
"private": true,
"main": "./.webpack/main.bundle.js",
"version": "2.40.4",
"version": "2.41.3",
"scripts": {
"start:prod": "electron ./.webpack/main.bundle.js",
"start": "cross-env NODE_ENV=development node ./tools/main.js",
"build": "cross-env NODE_ENV=production node ./tools/main.js build",
"build:testing": "cross-env NODE_ENV=production TESTING=1 node ./tools/main.js build",
"lint": "eslint src tools static --ext .js,.json,.ts,.tsx",
"prettier": "prettier --write \"{src,tools}/**/*.{js,json}\"",
"prettier:check": "prettier -c \"{src,tools}/**/*.{js,json}\"",
Expand All @@ -30,7 +31,7 @@
"draft-nightly-release": "node ./tools/dist draft --nightly -v",
"nightly": "node ./tools/dist --nightly --publish -v",
"nightly-build": "node ./tools/dist --nightly -v",
"build-ci": "node ./tools/dist --ci -v",
"build-ci": "cross-env STAGING=1 node ./tools/dist --ci -v",
"draft-release": "node ./tools/dist draft",
"release": "node ./tools/dist --publish -v",
"ci": "node ./tools/ci.js",
Expand All @@ -42,16 +43,15 @@
"dependencies": {
"@electron/remote": "^1.2.1",
"@hot-loader/react-dom": "^17.0.1",
"@ledgerhq/devices": "6.24.1",
"@ledgerhq/devices": "6.27.1",
"@ledgerhq/electron-updater": "^4.2.2",
"@ledgerhq/errors": "6.10.0",
"@ledgerhq/hw-transport": "6.24.1",
"@ledgerhq/hw-transport-http": "6.26.0",
"@ledgerhq/hw-transport-node-hid-singleton": "6.26.0",
"@ledgerhq/ledger-core": "6.14.5",
"@ledgerhq/live-common": "21.35.1",
"@ledgerhq/hw-transport": "6.27.1",
"@ledgerhq/hw-transport-http": "6.27.1",
"@ledgerhq/hw-transport-node-hid-singleton": "6.27.1",
"@ledgerhq/live-common": "22.0.3",
"@ledgerhq/logs": "6.10.0",
"@ledgerhq/react-ui": "^0.7.4",
"@ledgerhq/react-ui": "^0.7.5",
"@open-wc/webpack-import-meta-loader": "^0.4.7",
"@polkadot/react-identicon": "0.89.2",
"@tippyjs/react": "^4.2.6",
Expand Down Expand Up @@ -172,6 +172,7 @@
"copy-webpack-plugin": "^6.1.0",
"cross-env": "^7.0.3",
"css-loader": "^3.5.3",
"dotenv-webpack": "^7.1.0",
"electron": "13.5.2",
"electron-builder": "22.13.1",
"electron-devtools-installer": "^3.2.0",
Expand Down
32 changes: 23 additions & 9 deletions renderer.webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ const HtmlWebpackPlugin = require("html-webpack-plugin");
const HardSourceWebpackPlugin = require("hard-source-webpack-plugin");
const babelPlugins = require("./babel.plugins");
const UnusedWebpackPlugin = require("unused-webpack-plugin");
const Dotenv = require("dotenv-webpack");

const packagesToTranspile = [
/@polkadot[\\/]api/,
Expand All @@ -25,9 +26,9 @@ const packagesToTranspile = [
/@polkadot[\\/]x-textencoder/,
/@polkadot[\\/]x-ws/,
/@polkadot[\\/]react-identicon/,
]
];

const exceptionToTranspile = (path_ruled) => {
const exceptionToTranspile = path_ruled => {
// DO transpile these packages
if (packagesToTranspile.some(pkg => path_ruled.match(pkg))) {
return false;
Expand All @@ -36,19 +37,17 @@ const exceptionToTranspile = (path_ruled) => {
// Ignore all other modules that are in node_modules
if (path_ruled.match(/node_modules/)) {
return true;
}

else return false;
}
} else return false;
};

const includeToTranspile = (path_ruled) => {
const includeToTranspile = path_ruled => {
// DO transpile these packages
if (packagesToTranspile.some(pkg => path_ruled.match(pkg))) {
return true;
}

return false;
}
};

const babelConfig = {
presets: [
Expand Down Expand Up @@ -100,6 +99,18 @@ const babelTsConfig = {
],
};

function getDotenvPathFromEnv() {
if (process.env.TESTING) {
return ".env.testing";
} else if (process.env.STAGING) {
return ".env.staging";
} else if (process.env.NODE_ENV === "production") {
return ".env.production";
}

return ".env";
}

module.exports = {
target: "electron-renderer",
entry: ["./src/renderer/index.js"],
Expand All @@ -111,6 +122,9 @@ module.exports = {
minimize: false,
},
plugins: [
new Dotenv({
path: getDotenvPathFromEnv(),
}),
new HtmlWebpackPlugin({
template: "./src/renderer/index.html",
filename: "index.html",
Expand Down Expand Up @@ -146,7 +160,7 @@ module.exports = {
},
{
test: /\.js$/i,
loader: require.resolve('@open-wc/webpack-import-meta-loader'),
loader: require.resolve("@open-wc/webpack-import-meta-loader"),
include: includeToTranspile,
},
{
Expand Down
2 changes: 2 additions & 0 deletions src/config/urls.js
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,8 @@ export const urls = {
website: "https://elrond.com",
},
solana: {
staking: "https://support.ledger.com/hc/en-us/articles/4731749170461?docs=true",
recipient_info: "https://support.ledger.com",
ledgerByFigmentTC: "https://drive.google.com/file/d/1vlIh2gTwtbMon8_bzFQGjCLhTUqS5uQc",
},
};
51 changes: 18 additions & 33 deletions src/firebase-setup.js
Original file line number Diff line number Diff line change
@@ -1,36 +1,21 @@
export const firebaseDevelopmentConfig = {
apiKey: "AIzaSyDh7WKaA5cvXV1C554Djyd68vy_1LrXxhk",
authDomain: "ledger-live-development.firebaseapp.com",
projectId: "ledger-live-development",
storageBucket: "ledger-live-development.appspot.com",
messagingSenderId: "750497694072",
appId: "1:750497694072:web:d2fc719100b45405bac88d",
};

// We don't have the concept of staging on desktop but the
// Firebase project still exists
export const firebaseStagingConfig = {
apiKey: "AIzaSyCqosqFLVHMsMi3uOFFbCJItOby7i6Y4T8",
authDomain: "ledger-live-staging.firebaseapp.com",
projectId: "ledger-live-staging",
storageBucket: "ledger-live-staging.appspot.com",
messagingSenderId: "1008987457941",
appId: "1:1008987457941:web:14f6fbee631e0438d6ce9c",
};

export const firebaseProductionConfig = {
apiKey: "AIzaSyAzrQM75b6VXVwRzEDAM12ijfeOHlXvhA8",
authDomain: "ledger-live-production.firebaseapp.com",
projectId: "ledger-live-production",
storageBucket: "ledger-live-production.appspot.com",
messagingSenderId: "212042068804",
appId: "1:212042068804:web:268d6f11671689c0b51d11",
};

export function getFirebaseConfig() {
if (__DEV__) {
return firebaseDevelopmentConfig;
if (process.env.FIREBASE_API_KEY) {
return {
apiKey: process.env.FIREBASE_API_KEY,
authDomain: process.env.FIREBASE_AUTH_DOMAIN,
projectId: process.env.FIREBASE_PROJECT_ID,
storageBucket: process.env.FIREBASE_STORAGE_BUCKET,
messagingSenderId: process.env.FIREBASE_MESSAGING_SENDER_ID,
appId: process.env.FIREBASE_APP_ID,
};
} else {
return {
apiKey: "AIzaSyDh7WKaA5cvXV1C554Djyd68vy_1LrXxhk",
authDomain: "ledger-live-development.firebaseapp.com",
projectId: "ledger-live-development",
storageBucket: "ledger-live-development.appspot.com",
messagingSenderId: "750497694072",
appId: "1:750497694072:web:d2fc719100b45405bac88d",
};
}

return firebaseProductionConfig;
}
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,6 @@ if (!process.env.IS_INTERNAL_PROCESS) {
// Main electron thread
require("./main");
} else {
// Internal thread (libcore, hardware)
// Internal thread (coins, hardware)
require("./internal");
}
4 changes: 0 additions & 4 deletions src/internal/commands/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ import flushDevice from "./flushDevice";
import firmwareUpdating from "./firmwareUpdating";
import getLatestFirmwareForDevice from "./getLatestFirmwareForDevice";
import getSatStackStatus from "./getSatStackStatus";
import libcoreGetVersion from "./libcoreGetVersion";
import libcoreReset from "./libcoreReset";
import listenDevices from "./listenDevices";
import listApps from "./listApps";
import signMessage from "./signMessage";
Expand Down Expand Up @@ -40,8 +38,6 @@ export const commandsById = {
firmwareUpdating,
getLatestFirmwareForDevice,
getSatStackStatus,
libcoreGetVersion,
libcoreReset,
listenDevices,
connectApp,
connectManager,
Expand Down
18 changes: 0 additions & 18 deletions src/internal/commands/libcoreGetVersion.js

This file was deleted.

8 changes: 0 additions & 8 deletions src/internal/commands/libcoreReset.js

This file was deleted.

11 changes: 0 additions & 11 deletions src/internal/implement-libcore.js

This file was deleted.

2 changes: 0 additions & 2 deletions src/internal/live-common-setup.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// @flow
import "~/live-common-setup";
import "./implement-libcore";

import { throwError } from "rxjs";
import usbDetect from "usb-detection";
import throttle from "lodash/throttle";
Expand Down
1 change: 1 addition & 0 deletions src/live-common-set-supported-currencies.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,6 @@ setSupportedCurrencies([
"stakenet",
"bitcoin_testnet",
"ethereum_ropsten",
"ethereum_goerli",
"cosmos_testnet",
]);
1 change: 0 additions & 1 deletion src/main/internal-lifecycle.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ function handleGlobalInternalMessage(payload) {
// captureException(err)
break;
}
case "setLibcoreBusy":
case "setDeviceBusy": {
const win = getMainWindow && getMainWindow();
if (!win) {
Expand Down
2 changes: 0 additions & 2 deletions src/renderer/Default.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ import OnboardingOrElse from "~/renderer/components/OnboardingOrElse";
import AppRegionDrag from "~/renderer/components/AppRegionDrag";
import IsNewVersion from "~/renderer/components/IsNewVersion";
import IsSystemLanguageAvailable from "~/renderer/components/IsSystemLanguageAvailable";
import LibcoreBusyIndicator from "~/renderer/components/LibcoreBusyIndicator";
import DeviceBusyIndicator from "~/renderer/components/DeviceBusyIndicator";
import KeyboardContent from "~/renderer/components/KeyboardContent";
import PerfIndicator from "~/renderer/components/PerfIndicator";
Expand Down Expand Up @@ -232,7 +231,6 @@ export default function Default() {

{__NIGHTLY__ ? <NightlyLayer /> : null}

<LibcoreBusyIndicator />
<DeviceBusyIndicator />
<KeyboardContent sequence="BJBJBJ">
<PerfIndicator />
Expand Down
Loading

0 comments on commit c2ce96d

Please sign in to comment.