From 5bcad40c1693f509be56237edc0a9768daee49e5 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 15 Jan 2021 12:04:43 +0100 Subject: [PATCH 01/10] Fix electron app image Update and fix ledger connection for desktop app --- package.json | 18 +- public/electron.js | 3 +- public/{build => resources}/all-certs.p12 | Bin public/{build => resources}/background.png | Bin .../entitlements.mac.plist | 0 public/{build => resources}/icon.icns | Bin public/{build => resources}/icon.ico | Bin public/{build => resources}/safe.png | Bin yarn.lock | 199 ++++++------------ 9 files changed, 70 insertions(+), 150 deletions(-) rename public/{build => resources}/all-certs.p12 (100%) rename public/{build => resources}/background.png (100%) rename public/{build => resources}/entitlements.mac.plist (100%) rename public/{build => resources}/icon.icns (100%) rename public/{build => resources}/icon.ico (100%) rename public/{build => resources}/safe.png (100%) diff --git a/package.json b/package.json index 7d32b027..189b525a 100644 --- a/package.json +++ b/package.json @@ -67,7 +67,7 @@ }, "productName": "Safe Multisig", "build": { - "appId": "io.gnosis.safe.macos", + "appId": "io.gnosis.safe", "afterSign": "scripts/notarize.js", "extends": null, "productName": "Safe Multisig", @@ -110,14 +110,14 @@ "!yarn.lock" ], "directories": { - "buildResources": "public/build" + "buildResources": "public/resources" }, "mac": { "category": "public.app-category.productivity", "hardenedRuntime": true, - "entitlements": "public/build/entitlements.mac.plist", + "entitlements": "public/resources/entitlements.mac.plist", "gatekeeperAssess": false, - "entitlementsInherit": "public/build/entitlements.mac.plist", + "entitlementsInherit": "public/resources/entitlements.mac.plist", "target": [ "dmg", "zip" @@ -134,18 +134,18 @@ "deleteAppDataOnUninstall": true }, "linux": { + "category": "Finance", "target": [ "AppImage", "deb", "zip" - ], - "icon": "./public/build/safe.png" + ] }, "win": { "target": [ "nsis" ], - "icon": "public/build/icon.ico" + "icon": "public/resources/icon.ico" } }, "resolutions": { @@ -170,7 +170,7 @@ "@gnosis.pm/safe-contracts": "1.1.1-dev.2", "@gnosis.pm/safe-react-components": "https://github.com/gnosis/safe-react-components.git#bf3a84486b7353bd25447ddff39c406f6fafecc6", "@gnosis.pm/util-contracts": "2.0.6", - "@ledgerhq/hw-transport-node-hid-singleton": "5.34.0", + "@ledgerhq/hw-transport-node-hid-singleton": "5.38.0", "@material-ui/core": "^4.11.0", "@material-ui/icons": "4.9.1", "@material-ui/lab": "4.0.0-alpha.56", @@ -258,7 +258,7 @@ "cross-env": "^7.0.3", "dotenv": "^8.2.0", "dotenv-expand": "^5.1.0", - "electron": "^9.3.5", + "electron": "^9.4.0", "electron-builder": "22.9.1", "electron-notarize": "1.0.0", "eslint": "^7.11.0", diff --git a/public/electron.js b/public/electron.js index ae9368b8..92626c81 100644 --- a/public/electron.js +++ b/public/electron.js @@ -90,9 +90,10 @@ function createWindow(port = DEFAULT_PORT) { webPreferences: { preload: path.join(__dirname, '../scripts/preload.js'), allowRunningInsecureContent: true, + enableRemoteModule: true, nativeWindowOpen: true, // need to be set in order to display modal }, - icon: electron.nativeImage.createFromPath(path.join(__dirname, './build/safe.png')), + icon: electron.nativeImage.createFromPath(path.join(__dirname, '../build/resources/safe.png')), }) mainWindow.once('ready-to-show', () => { diff --git a/public/build/all-certs.p12 b/public/resources/all-certs.p12 similarity index 100% rename from public/build/all-certs.p12 rename to public/resources/all-certs.p12 diff --git a/public/build/background.png b/public/resources/background.png similarity index 100% rename from public/build/background.png rename to public/resources/background.png diff --git a/public/build/entitlements.mac.plist b/public/resources/entitlements.mac.plist similarity index 100% rename from public/build/entitlements.mac.plist rename to public/resources/entitlements.mac.plist diff --git a/public/build/icon.icns b/public/resources/icon.icns similarity index 100% rename from public/build/icon.icns rename to public/resources/icon.icns diff --git a/public/build/icon.ico b/public/resources/icon.ico similarity index 100% rename from public/build/icon.ico rename to public/resources/icon.ico diff --git a/public/build/safe.png b/public/resources/safe.png similarity index 100% rename from public/build/safe.png rename to public/resources/safe.png diff --git a/yarn.lock b/yarn.lock index 606db658..719844d5 100644 --- a/yarn.lock +++ b/yarn.lock @@ -54,15 +54,6 @@ semver "^5.4.1" source-map "^0.5.0" -"@babel/generator@^7.12.1": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.1.tgz#0d70be32bdaa03d7c51c8597dda76e0df1f15468" - integrity sha512-DB+6rafIdc9o72Yc3/Ph5h+6hUjeOp66pF0naQBgUFFuPqzQwIlPTm3xZR7YNvduIMtkDIj2t21LSQwnbCrXvg== - dependencies: - "@babel/types" "^7.12.1" - jsesc "^2.5.1" - source-map "^0.5.0" - "@babel/generator@^7.12.10": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.10.tgz#2b188fc329fb8e4f762181703beffc0fe6df3460" @@ -72,15 +63,6 @@ jsesc "^2.5.1" source-map "^0.5.0" -"@babel/generator@^7.12.5": - version "7.12.5" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.12.5.tgz#a2c50de5c8b6d708ab95be5e6053936c1884a4de" - integrity sha512-m16TQQJ8hPt7E+OS/XVQg/7U184MLXtvuGbCdA7na61vha+ImkyyNM/9DDA0unYCVZn3ZOhng+qz48/KBOT96A== - dependencies: - "@babel/types" "^7.12.5" - jsesc "^2.5.1" - source-map "^0.5.0" - "@babel/helper-annotate-as-pure@^7.0.0", "@babel/helper-annotate-as-pure@^7.10.4": version "7.10.4" resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.10.4.tgz#5bf0d495a3f757ac3bda48b5bf3b3ba309c72ba3" @@ -300,21 +282,11 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.1.0", "@babel/parser@^7.12.1", "@babel/parser@^7.7.0": - version "7.12.3" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.3.tgz#a305415ebe7a6c7023b40b5122a0662d928334cd" - integrity sha512-kFsOS0IbsuhO5ojF8Hc8z/8vEIOkylVBrjiZUbLTE3XFe0Qi+uu6HjzQixkFaqr0ZPAMZcBVxEwmsnsLPZ2Xsw== - -"@babel/parser@^7.12.10": +"@babel/parser@^7.1.0", "@babel/parser@^7.12.10", "@babel/parser@^7.12.7", "@babel/parser@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.10.tgz#824600d59e96aea26a5a2af5a9d812af05c3ae81" integrity sha512-PJdRPwyoOqFAWfLytxrWwGrAxghCgh/yTNCYciOz8QgjflA7aZhECPZAa2VUedKg2+QMWkI0L9lynh2SNmNEgA== -"@babel/parser@^7.12.7": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.12.7.tgz#fee7b39fe809d0e73e5b25eecaf5780ef3d73056" - integrity sha512-oWR02Ubp4xTLCAqPRiNIuMVgNO5Aif/xpXtabhzW2HWUD47XJsAB4Zd/Rg30+XeQA3juXigV7hlquOTmwqLiwg== - "@babel/plugin-proposal-async-generator-functions@^7.12.1": version "7.12.1" resolved "https://registry.yarnpkg.com/@babel/plugin-proposal-async-generator-functions/-/plugin-proposal-async-generator-functions-7.12.1.tgz#dc6c1170e27d8aca99ff65f4925bd06b1c90550e" @@ -1133,22 +1105,7 @@ "@babel/parser" "^7.12.7" "@babel/types" "^7.12.7" -"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.1.tgz#941395e0c5cc86d5d3e75caa095d3924526f0c1e" - integrity sha512-MA3WPoRt1ZHo2ZmoGKNqi20YnPt0B1S0GTZEPhhd+hw2KGUzBlHuVunj6K4sNuK+reEvyiPwtp0cpaqLzJDmAw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.1" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.1" - "@babel/types" "^7.12.1" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/traverse@^7.12.10": +"@babel/traverse@^7.1.0", "@babel/traverse@^7.10.4", "@babel/traverse@^7.12.1", "@babel/traverse@^7.12.10", "@babel/traverse@^7.12.5", "@babel/traverse@^7.4.5", "@babel/traverse@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.10.tgz#2d1f4041e8bf42ea099e5b2dc48d6a594c00017a" integrity sha512-6aEtf0IeRgbYWzta29lePeYSk+YAFIC3kyqESeft8o5CkFlYIMX+EQDDWEiAQ9LHOA3d0oHdgrSsID/CKqXJlg== @@ -1163,31 +1120,7 @@ globals "^11.1.0" lodash "^4.17.19" -"@babel/traverse@^7.12.5": - version "7.12.9" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.12.9.tgz#fad26c972eabbc11350e0b695978de6cc8e8596f" - integrity sha512-iX9ajqnLdoU1s1nHt36JDI9KG4k+vmI8WgjK5d+aDTwQbL2fUnzedNedssA645Ede3PM2ma1n8Q4h2ohwXgMXw== - dependencies: - "@babel/code-frame" "^7.10.4" - "@babel/generator" "^7.12.5" - "@babel/helper-function-name" "^7.10.4" - "@babel/helper-split-export-declaration" "^7.11.0" - "@babel/parser" "^7.12.7" - "@babel/types" "^7.12.7" - debug "^4.1.0" - globals "^11.1.0" - lodash "^4.17.19" - -"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.3.0", "@babel/types@^7.4.4", "@babel/types@^7.7.0": - version "7.12.1" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.1.tgz#e109d9ab99a8de735be287ee3d6a9947a190c4ae" - integrity sha512-BzSY3NJBKM4kyatSOWh3D/JJ2O3CVzBybHWxtgxnggaxEuaSTTDqeiSb/xk9lrkw2Tbqyivw5ZU4rT+EfznQsA== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - -"@babel/types@^7.12.10": +"@babel/types@^7.0.0", "@babel/types@^7.10.4", "@babel/types@^7.10.5", "@babel/types@^7.11.0", "@babel/types@^7.12.1", "@babel/types@^7.12.10", "@babel/types@^7.12.5", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.3.0", "@babel/types@^7.3.3", "@babel/types@^7.4.4", "@babel/types@^7.7.0": version "7.12.10" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.10.tgz#7965e4a7260b26f09c56bcfcb0498af1f6d9b260" integrity sha512-sf6wboJV5mGyip2hIpDSKsr80RszPinEFjsHTalMxZAZkoQ2/2yQzxlcFN52SJqsyPfLtPmenL4g2KB3KJXPDw== @@ -1196,15 +1129,6 @@ lodash "^4.17.19" to-fast-properties "^2.0.0" -"@babel/types@^7.12.5", "@babel/types@^7.12.6", "@babel/types@^7.12.7", "@babel/types@^7.3.3": - version "7.12.7" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.12.7.tgz#6039ff1e242640a29452c9ae572162ec9a8f5d13" - integrity sha512-MNyI92qZq6jrQkXvtIiykvl4WtoRrVV9MPn+ZfsoEENjiWcBQ3ZSHrkxnJWgWtLX3XXqX5hrSQ+X69wkmesXuQ== - dependencies: - "@babel/helper-validator-identifier" "^7.10.4" - lodash "^4.17.19" - to-fast-properties "^2.0.0" - "@bcoe/v8-coverage@^0.2.3": version "0.2.3" resolved "https://registry.yarnpkg.com/@bcoe/v8-coverage/-/v8-coverage-0.2.3.tgz#75a2e8b51cb758a7553d6804a5932d7aace75c39" @@ -1827,19 +1751,19 @@ dependencies: invariant "2" -"@ledgerhq/devices@^5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.34.0.tgz#4cb073a7bc9528f42f539241fedf44c0c6b451dc" - integrity sha512-oRoZDDfufXAv9KofQdOXc0QztISa9x/YVdiWs55iOlNRQjWYHSPFzeSP6+J+tN0Au/GS9v+wcnTf+tHCtVz27Q== +"@ledgerhq/devices@^5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/devices/-/devices-5.38.0.tgz#0b805020c4f3ac40d35f1b1af6d64d04256b1e0f" + integrity sha512-1RZ+Dh+oVUDMeaPSCeQ56qzgiMHHy481dbkRCDUMRJEzkGqOLI3k34x7XdkVKy1NQdt8G8sYyobP/yixDry5ow== dependencies: - "@ledgerhq/errors" "^5.34.0" - "@ledgerhq/logs" "^5.30.0" + "@ledgerhq/errors" "^5.38.0" + "@ledgerhq/logs" "^5.38.0" rxjs "^6.6.3" -"@ledgerhq/errors@^5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.34.0.tgz#c003b0929f8ca0c74901a11a88b3e3db4b40e4b7" - integrity sha512-8Td60sOP5wzsjmxmj9Q5hjrr1XjCfB3Vdifq+1fiD6rpjyscYLgmoP2y5GYDPceDhalA/GOrKNSf+aIVVmBNOw== +"@ledgerhq/errors@^5.34.0", "@ledgerhq/errors@^5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/errors/-/errors-5.38.0.tgz#1642b87de47cbabc7b75ca93005a690895920a72" + integrity sha512-d4gQzbOLNBoGIwDtEGFNSb0w0aYN10T5Y749e+vqiJoS3dWrB+5BCSQ/U/ALet0wi/UMIyFY/xmgd1gPaPB3Hw== "@ledgerhq/hw-app-eth@^5.21.0": version "5.35.1" @@ -1852,29 +1776,29 @@ bignumber.js "^9.0.1" rlp "^2.2.6" -"@ledgerhq/hw-transport-node-hid-noevents@^5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-5.34.0.tgz#c31cc3e3033f6fbf77b81c3a9c34230aadd6f3cb" - integrity sha512-n5KRdZ6nmDrmsEXFjIipNdx9rhHbEFmZ5YDoUkdShvKFmaDeKVn0h7RCBwblJRITUZl0RfBzBuBRlpNjQsFfqg== +"@ledgerhq/hw-transport-node-hid-noevents@^5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-noevents/-/hw-transport-node-hid-noevents-5.38.0.tgz#ffbfb0b997e585fc08b6b220997caaa59e094554" + integrity sha512-zuxN3gWfCuN+pbK3BKc8z3VCulKI7zee1N3xhCWua9TiwL3leBTBs25Bvm22fmiLJYhzszccbF673/bpnnIQAA== dependencies: - "@ledgerhq/devices" "^5.34.0" - "@ledgerhq/errors" "^5.34.0" - "@ledgerhq/hw-transport" "^5.34.0" - "@ledgerhq/logs" "^5.30.0" - node-hid "2.0.0-0" + "@ledgerhq/devices" "^5.38.0" + "@ledgerhq/errors" "^5.38.0" + "@ledgerhq/hw-transport" "^5.38.0" + "@ledgerhq/logs" "^5.38.0" + node-hid "2.1.1" -"@ledgerhq/hw-transport-node-hid-singleton@5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-singleton/-/hw-transport-node-hid-singleton-5.34.0.tgz#1bba566a28efe0bbb31c1c2f214ca574a7b69104" - integrity sha512-RMgWafAyHyZtQjVe1dwu90oSsQ4W/4CpSx2ps87u5sDyWyNURti2pdraDZ1kosLhqTEYedU3VfTV4EFJZ5yfuw== +"@ledgerhq/hw-transport-node-hid-singleton@5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport-node-hid-singleton/-/hw-transport-node-hid-singleton-5.38.0.tgz#ea133ac3a7015aaafd5d629388da4d4a2086c761" + integrity sha512-FPpr6R2Cs6YKCamprC9vzJa+P7RieyMLQC3cG6EjYg8tmvHPtIxpmWFclNi45jZ05Ve1YvNjutoHVTVn0cOnpg== dependencies: - "@ledgerhq/devices" "^5.34.0" - "@ledgerhq/errors" "^5.34.0" - "@ledgerhq/hw-transport" "^5.34.0" - "@ledgerhq/hw-transport-node-hid-noevents" "^5.34.0" - "@ledgerhq/logs" "^5.30.0" + "@ledgerhq/devices" "^5.38.0" + "@ledgerhq/errors" "^5.38.0" + "@ledgerhq/hw-transport" "^5.38.0" + "@ledgerhq/hw-transport-node-hid-noevents" "^5.38.0" + "@ledgerhq/logs" "^5.38.0" lodash "^4.17.20" - node-hid "2.0.0-0" + node-hid "2.1.1" usb-detection "^4.10.0" "@ledgerhq/hw-transport-u2f@^5.21.0": @@ -1887,19 +1811,19 @@ "@ledgerhq/logs" "^5.30.0" u2f-api "0.2.7" -"@ledgerhq/hw-transport@^5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.34.0.tgz#b27eb0d9941a2e6220e5af3e3d4f48ce8a993982" - integrity sha512-JxhqU9sBn+WH3CPMus9b70SED7LEeW17xw0VL5aRdxFu4YS5rhy5Xf4Sd5jIQfyDkHik1ouzfJVuQEju8+GGBw== +"@ledgerhq/hw-transport@^5.34.0", "@ledgerhq/hw-transport@^5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/hw-transport/-/hw-transport-5.38.0.tgz#b02bea73d77e729d13c367a967df1666f9ef940d" + integrity sha512-CAxvHukCcp+RqaEsSltmBw4Lb1yW42fiF/LTYN7JvCkZyLIQhvkndLDVCgp4hpMdtLK4bkf7RJRElqbN0vRoAQ== dependencies: - "@ledgerhq/devices" "^5.34.0" - "@ledgerhq/errors" "^5.34.0" + "@ledgerhq/devices" "^5.38.0" + "@ledgerhq/errors" "^5.38.0" events "^3.2.0" -"@ledgerhq/logs@^5.30.0": - version "5.30.0" - resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.30.0.tgz#76e8d7e5a06a73c9b99da51fa5befd5cfd5309d4" - integrity sha512-wUhg2VTfUrWihjdGqKkH/s7TBzdIM1yyd2LiscYsfTX2I0xYDMnpE+NkMReeGU8PN3QhCPgnlg9/P9V6UWoJBA== +"@ledgerhq/logs@^5.30.0", "@ledgerhq/logs@^5.38.0": + version "5.38.0" + resolved "https://registry.yarnpkg.com/@ledgerhq/logs/-/logs-5.38.0.tgz#3c5dbd1f62c0bf5580477b218fb57c67b575643a" + integrity sha512-i87Yn89Cq2D9Y0KmrEzCm62XHzI2edeOTBENKH6vAyzESGzyF+SBoqtZNwrjJcKup3/9dNn/zHjpicY7ev94Vw== "@material-ui/core@^4.11.0": version "4.11.2" @@ -8144,10 +8068,10 @@ electron-updater@4.3.5: lodash.isequal "^4.5.0" semver "^7.3.2" -electron@^9.3.5: - version "9.3.5" - resolved "https://registry.yarnpkg.com/electron/-/electron-9.3.5.tgz#7967146b81e6d9b484773243fd4a4f671a50b884" - integrity sha512-EPmDsp7sO0UPtw7nLD1ufse/nBskP+ifXzBgUg9psCUlapkzuwYi6pmLAzKLW/bVjwgyUKwh1OKWILWfOeLGcQ== +electron@^9.4.0: + version "9.4.1" + resolved "https://registry.yarnpkg.com/electron/-/electron-9.4.1.tgz#62a2aae4cd93f1b56d794a47541505a71654177a" + integrity sha512-r4CxoVG9Ja7tBtkilWMnBsBGup8G8Z+v7icZmwysHa8/OSr0OrLjrcOF/30BAP7yPE5fz/XTxygnltzW4OTZdw== dependencies: "@electron/get" "^1.0.1" "@types/node" "^12.0.12" @@ -13871,10 +13795,10 @@ node-gyp-build@^4.2.0: resolved "https://registry.yarnpkg.com/node-gyp-build/-/node-gyp-build-4.2.3.tgz#ce6277f853835f718829efb47db20f3e4d9c4739" integrity sha512-MN6ZpzmfNCRM+3t57PTJHgHyw/h4OWnZ6mR8P5j/uZtqQr46RRuDE/P+g3n0YR/AiYXeWixZZzaip77gdICfRg== -node-hid@2.0.0-0: - version "2.0.0-0" - resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-2.0.0-0.tgz#35daffb4708f27331ca4143af0b8cf338fea9908" - integrity sha512-Ywc4WaMANhvqHDTynRmbuP52ln76WiNRjjAom5l2uLyNY1wixCVjISi+SP4/Rfgcddq9UJM1sR5+lPD0GcvvMg== +node-hid@2.1.1: + version "2.1.1" + resolved "https://registry.yarnpkg.com/node-hid/-/node-hid-2.1.1.tgz#f83c8aa0bb4e6758b5f7383542477da93f67359d" + integrity sha512-Skzhqow7hyLZU93eIPthM9yjot9lszg9xrKxESleEs05V2NcbUptZc5HFqzjOkSmL0sFlZFr3kmvaYebx06wrw== dependencies: bindings "^1.5.0" node-addon-api "^3.0.2" @@ -17022,14 +16946,7 @@ resolve@1.18.1: is-core-module "^2.0.0" path-parse "^1.0.6" -resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.17.0, resolve@^1.8.1, resolve@~1.17.0: - version "1.17.0" - resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" - integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== - dependencies: - path-parse "^1.0.6" - -resolve@^1.14.2, resolve@^1.18.1: +resolve@^1.1.6, resolve@^1.10.0, resolve@^1.11.0, resolve@^1.12.0, resolve@^1.13.1, resolve@^1.14.2, resolve@^1.17.0, resolve@^1.18.1, resolve@^1.8.1: version "1.19.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.19.0.tgz#1af5bf630409734a067cae29318aac7fa29a267c" integrity sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg== @@ -17037,6 +16954,13 @@ resolve@^1.14.2, resolve@^1.18.1: is-core-module "^2.1.0" path-parse "^1.0.6" +resolve@~1.17.0: + version "1.17.0" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.17.0.tgz#b25941b54968231cc2d1bb76a79cb7f2c0bf8444" + integrity sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w== + dependencies: + path-parse "^1.0.6" + responselike@^1.0.2: version "1.0.2" resolved "https://registry.yarnpkg.com/responselike/-/responselike-1.0.2.tgz#918720ef3b631c5642be068f15ade5a46f4ba1e7" @@ -20690,12 +20614,7 @@ whatwg-fetch@2.0.4: resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-2.0.4.tgz#dde6a5df315f9d39991aa17621853d720b85566f" integrity sha512-dcQ1GWpOD/eEQ97k66aiEVpNnapVj90/+R+SXTPYGHpYBBypfKJEQjLrvMZ7YXbKm21gXd4NcuxUTjiv1YtLng== -whatwg-fetch@^3.4.1: - version "3.4.1" - resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.4.1.tgz#e5f871572d6879663fa5674c8f833f15a8425ab3" - integrity sha512-sofZVzE1wKwO+EYPbWfiwzaKovWiZXf4coEzjGP9b2GBVgQRLQUZ2QcuPpQExGDAW5GItpEm6Tl4OU5mywnAoQ== - -whatwg-fetch@^3.5.0: +whatwg-fetch@^3.4.1, whatwg-fetch@^3.5.0: version "3.5.0" resolved "https://registry.yarnpkg.com/whatwg-fetch/-/whatwg-fetch-3.5.0.tgz#605a2cd0a7146e5db141e29d1c62ab84c0c4c868" integrity sha512-jXkLtsR42xhXg7akoDKvKWE40eJeI+2KZqcp2h3NsOrRnDvtWX36KcKl30dy+hxECivdk2BVUHVNrPtoMBUx6A== From 6cc780c994ad8faffd61c812912368b475963b52 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 15 Jan 2021 20:17:13 +0100 Subject: [PATCH 02/10] Upgrade build action to use node 14 --- .github/workflows/release.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f6fd6576..2e0f2488 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -52,9 +52,9 @@ jobs: yarn global add node-gyp yarn config set node_gyp "$_\node_modules\node-gyp\bin\node-gyp.js" - name: Install Node.js, NPM and Yarn - uses: actions/setup-node@v1 + uses: actions/setup-node@v2 with: - node-version: 12 + node-version: 14 - run: yarn install --frozen-lockfile --network-concurrency 1 - name: Build/Release Desktop App env: From b7f1036a603e4b3e7d3669c1c5a3f723dea2f9cb Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Fri, 15 Jan 2021 22:47:07 +0100 Subject: [PATCH 03/10] Disable yarn cache for electron build --- .github/workflows/release.yml | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 2e0f2488..05ed593d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,17 +28,17 @@ jobs: uses: actions/checkout@v2 # Add cache for yarn directory - - name: Get yarn cache directory path - id: yarn-cache-dir-path - run: echo "::set-output name=dir::$(yarn cache dir)" + # - name: Get yarn cache directory path + # id: yarn-cache-dir-path + # run: echo "::set-output name=dir::$(yarn cache dir)" - - uses: actions/cache@v2 - id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) - with: - path: ${{ steps.yarn-cache-dir-path.outputs.dir }} - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} - restore-keys: | - ${{ runner.os }}-yarn- + # - uses: actions/cache@v2 + # id: yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`) + # with: + # path: ${{ steps.yarn-cache-dir-path.outputs.dir }} + # key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} + # restore-keys: | + # ${{ runner.os }}-yarn- - name: Patch node gyp on windows to support Visual Studio 2019 if: startsWith(matrix.os, 'windows') From 2264b1cb7e6b2c54c5b1e3ce5c91a3e46c86b55f Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Sat, 16 Jan 2021 00:12:36 +0100 Subject: [PATCH 04/10] Remove unused blocknative keys Remove unused build file --- .github/ISSUE_TEMPLATE/workflows/release.yml | 55 -------------------- .github/workflows/release.yml | 1 - docs/networks.md | 2 - src/utils/constants.ts | 1 - 4 files changed, 59 deletions(-) delete mode 100644 .github/ISSUE_TEMPLATE/workflows/release.yml diff --git a/.github/ISSUE_TEMPLATE/workflows/release.yml b/.github/ISSUE_TEMPLATE/workflows/release.yml deleted file mode 100644 index 550e1514..00000000 --- a/.github/ISSUE_TEMPLATE/workflows/release.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: Build/release - -# this will help you specify where to run -on: - push: - branches: - # this will run on the specified branch - - feature/desktop-app - -env: - REACT_APP_BLOCKNATIVE_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_KEY }} - REACT_APP_FORTMATIC_KEY: ${{ secrets.REACT_APP_FORTMATIC_KEY }} - REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET }} - REACT_APP_INFURA_TOKEN: ${{ secrets.REACT_APP_INFURA_TOKEN }} - REACT_APP_PORTIS_ID: ${{ secrets.REACT_APP_PORTIS_ID }} - -jobs: - release: - runs-on: ${{ matrix.os }} - - strategy: - matrix: - os: [macos-latest, ubuntu-latest] - - steps: - - name: Check out Git repository - uses: actions/checkout@v1 - - - name: Install Node.js, NPM and Yarn - uses: actions/setup-node@v1 - with: - node-version: 10.16 - - - name: Build/release Electron app - env: - # macOS notarization API key - APPLEID: ${{ secrets.APPLE_ID }} - APPLEIDPASS: ${{ secrets.APPLE_ID_PASS }} - uses: samuelmeuli/action-electron-builder@v1 - with: - #Build scipt - build_script_name: build-desktop - - # GitHub token, automatically provided to the action - # (No need to define this secret in the repo settings) - - github_token: ${{ secrets.github_token }} - - # macOS code signing certificate - mac_certs: ${{ secrets.MAC_CERTS }} - mac_certs_password: ${{ secrets.MAC_CERTS_PASSWORD }} - - # If the commit is tagged with a version (e.g. "v1.0.0"), - # release the app after building - release: ${{ startsWith(github.ref, 'refs/tags/v') }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 05ed593d..fc596b8c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,6 @@ on: workflow_dispatch env: - REACT_APP_BLOCKNATIVE_KEY: ${{ secrets.REACT_APP_BLOCKNATIVE_KEY }} REACT_APP_FORTMATIC_KEY: ${{ secrets.REACT_APP_FORTMATIC_KEY }} REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET: ${{ secrets.REACT_APP_GOOGLE_ANALYTICS_ID_MAINNET }} REACT_APP_INFURA_TOKEN: ${{ secrets.REACT_APP_INFURA_TOKEN }} diff --git a/docs/networks.md b/docs/networks.md index e1519441..a048fa86 100644 --- a/docs/networks.md +++ b/docs/networks.md @@ -161,7 +161,6 @@ export type GasPriceOracle = { - **REACT_APP_GOOGLE_ANALYTICS**: Used for enabling google analytics - **REACT_APP_PORTIS_ID**: Portis ID for enabling it on given network - **REACT_APP_FORTMATIC_KEY**: Formatic yey for given network -- **REACT_APP_BLOCKNATIVE_KEY**: Blocknative key for given network --- ## How to add a network @@ -190,7 +189,6 @@ export enum ETHEREUM_NETWORK { * REACT_APP_GOOGLE_ANALYTICS * REACT_APP_PORTIS_ID * REACT_APP_FORTMATIC_KEY -* REACT_APP_BLOCKNATIVE_KEY 3) Add the **NetworkSettings** in [`src/config/networks`](/src/config/networks) as `.ts`: diff --git a/src/utils/constants.ts b/src/utils/constants.ts index c03e7121..57e6b3dd 100644 --- a/src/utils/constants.ts +++ b/src/utils/constants.ts @@ -7,7 +7,6 @@ export const GOOGLE_ANALYTICS_ID = process.env.REACT_APP_GOOGLE_ANALYTICS || '' export const SENTRY_DSN = process.env.REACT_APP_SENTRY_DSN || '' export const PORTIS_ID = process.env.REACT_APP_PORTIS_ID ?? '852b763d-f28b-4463-80cb-846d7ec5806b' export const FORTMATIC_KEY = process.env.REACT_APP_FORTMATIC_KEY ?? 'pk_test_CAD437AA29BE0A40' -export const BLOCKNATIVE_KEY = process.env.REACT_APP_BLOCKNATIVE_KEY ?? '7fbb9cee-7e97-4436-8770-8b29a9a8814c' /* * Not being used export const SQUARELINK_ID = { From 6daaf0cb6db41a0c308cd2e45e33b4afb26a9546 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Sat, 16 Jan 2021 00:13:17 +0100 Subject: [PATCH 05/10] Enable dev tools to test electron build --- public/electron.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/electron.js b/public/electron.js index 92626c81..c149df06 100644 --- a/public/electron.js +++ b/public/electron.js @@ -102,11 +102,11 @@ function createWindow(port = DEFAULT_PORT) { mainWindow.loadURL(isDev ? 'http://localhost:3000' : `https://localhost:${port}`) - if (isDev) { + // if (isDev) { // Open the DevTools. mainWindow.webContents.openDevTools() //BrowserWindow.addDevToolsExtension(''); - } + // } mainWindow.setMenu(null) mainWindow.setMenuBarVisibility(false) From 54ed65ca4ef5c883b3622867eea6e7f57320e0d9 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Mon, 18 Jan 2021 10:20:04 +0100 Subject: [PATCH 06/10] Disable devtools --- public/electron.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/public/electron.js b/public/electron.js index c149df06..92626c81 100644 --- a/public/electron.js +++ b/public/electron.js @@ -102,11 +102,11 @@ function createWindow(port = DEFAULT_PORT) { mainWindow.loadURL(isDev ? 'http://localhost:3000' : `https://localhost:${port}`) - // if (isDev) { + if (isDev) { // Open the DevTools. mainWindow.webContents.openDevTools() //BrowserWindow.addDevToolsExtension(''); - // } + } mainWindow.setMenu(null) mainWindow.setMenuBarVisibility(false) From 4a10ed045f7498df4be48bdd8f9c9c73989ec96a Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Mon, 18 Jan 2021 11:14:29 +0100 Subject: [PATCH 07/10] Build desktop app using latest ubuntu runner --- .github/workflows/release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fc596b8c..9ff9aa1d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,7 +20,7 @@ jobs: fail-fast: false max-parallel: 15 matrix: - os: [macos-latest, windows-latest, ubuntu-latest] + os: [macos-latest, windows-latest, ubuntu-20.04] steps: - name: Check out Git repository From 4aa5955b08f525ea851ddeafcb3ded5e51fd4d13 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Mon, 18 Jan 2021 12:07:34 +0100 Subject: [PATCH 08/10] Set v2.17.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 189b525a..f846bfa3 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "safe-react", - "version": "2.17.0", + "version": "2.17.1", "description": "Allowing crypto users manage funds in a safer way", "website": "https://github.com/gnosis/safe-react#readme", "bugs": { From d6d820ca3b0605eaddbb7822a5fed042b2252f41 Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Tue, 19 Jan 2021 09:40:30 +0100 Subject: [PATCH 09/10] Update packed files for desktop app --- package.json | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/package.json b/package.json index f846bfa3..01320285 100644 --- a/package.json +++ b/package.json @@ -94,20 +94,13 @@ } ] }, - "files": [ - "**/*", - "!src${/*}", - "!config${/*}", - "!contracts${/*}", - "!migrations${/*}", - "!flow-typed${/*}", - "!apps${/*}", - "!out${/*}", - "!.editorconfig", - "!.gitignore", - "!README.md", - "!yarn-error.log", - "!yarn.lock" + "files": [ + "build", + "patches", + "public", + "scripts", + "dev-app-update.yml", + "package.json" ], "directories": { "buildResources": "public/resources" From e65849691e37fd529ba60c0d1cadc056bfe01f1f Mon Sep 17 00:00:00 2001 From: Daniel Sanchez Date: Tue, 19 Jan 2021 13:17:15 +0100 Subject: [PATCH 10/10] Update client signature --- public/electron.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public/electron.js b/public/electron.js index 92626c81..ac071d25 100644 --- a/public/electron.js +++ b/public/electron.js @@ -142,7 +142,7 @@ process.on('uncaughtException', function (error) { }) app.userAgentFallback = - 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) old-airport-include/1.0.0 Chrome Electron/9.3.1 Safari/537.36' + 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_6) AppleWebKit/537.36 (KHTML, like Gecko) old-airport-include/1.0.0 Chrome Electron/9.4.1 Safari/537.36' // We have one non-context-aware module in node_modules/usb. This is used by @ledgerhq/hw-transport-node-hid // This type of modules will be impossible to use after electron 10