From 24a32599d41aacb6a89eb868a4db6aa34fb565c8 Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Date: Thu, 2 Jan 2020 00:09:14 -0600 Subject: [PATCH 1/4] OPS: Package updates --- ios/Podfile.lock | 24 +++---- package-lock.json | 163 ++++++++++++++++++++++++++-------------------- package.json | 10 +-- 3 files changed, 110 insertions(+), 87 deletions(-) diff --git a/ios/Podfile.lock b/ios/Podfile.lock index 6fd4e975..254adc46 100644 --- a/ios/Podfile.lock +++ b/ios/Podfile.lock @@ -82,7 +82,7 @@ PODS: - React - react-native-randombytes (3.5.3): - React - - react-native-slider (2.0.0-rc.1): + - react-native-slider (2.0.8): - React - react-native-webview (6.9.0): - React @@ -125,13 +125,13 @@ PODS: - React - RNHandoff (0.0.3): - React - - RNQuickAction (0.3.12): + - RNQuickAction (0.3.13): - React - RNRate (1.0.1): - React - RNSecureKeyStore (1.0.0): - React - - RNSentry (1.0.9): + - RNSentry (1.2.1): - React - Sentry (~> 4.4.0) - RNShare (2.0.0): @@ -140,11 +140,11 @@ PODS: - React - RNVectorIcons (6.6.0): - React - - RNWatch (0.4.1): + - RNWatch (0.4.2): - React - - Sentry (4.4.2): - - Sentry/Core (= 4.4.2) - - Sentry/Core (4.4.2) + - Sentry (4.4.3): + - Sentry/Core (= 4.4.3) + - Sentry/Core (4.4.3) - swift_qrcodejs (1.1.2) - TcpSockets (3.3.2): - React @@ -334,7 +334,7 @@ SPEC CHECKSUMS: react-native-haptic-feedback: 22c9dc85fd8059f83bf9edd9212ac4bd4ae6074d react-native-image-picker: 3637d63fef7e32a230141ab4660d3ceb773c824f react-native-randombytes: 991545e6eaaf700b4ee384c291ef3d572e0b2ca8 - react-native-slider: 6d83f7b8076a84e965a43fbdcfcf9dac19cea42e + react-native-slider: b2f361499888302147205f17f6fffa921a7bda70 react-native-webview: f72ac4078e115dfa741cc588acb1cca25566457d React-RCTActionSheet: b0f1ea83f4bf75fb966eae9bfc47b78c8d3efd90 React-RCTAnimation: 359ba1b5690b1e87cc173558a78e82d35919333e @@ -354,15 +354,15 @@ SPEC CHECKSUMS: RNFS: c9bbde46b0d59619f8e7b735991c60e0f73d22c1 RNGestureHandler: 5329a942fce3d41c68b84c2c2276ce06a696d8b0 RNHandoff: d3b0754cca3a6bcd9b25f544f733f7f033ccf5fa - RNQuickAction: eca9a5dd04b5cdf8a0dd32d8be8844dc33aba2bd + RNQuickAction: 6d404a869dc872cde841ad3147416a670d13fa93 RNRate: 29be49c24b314c4e8ec09d848c3965f61cb0be47 RNSecureKeyStore: f1ad870e53806453039f650720d2845c678d89c8 - RNSentry: 2803ba8c8129dcf26b79e9b4d8c80168be6e4390 + RNSentry: 9b1d983b2d5d1c215ba6490348fd2a4cc23a8a9d RNShare: 8b171d4b43c1d886917fdd303bf7a4b87167b05c RNSVG: 0eb087cfb5d7937be93c45b163b26352a647e681 RNVectorIcons: 0bb4def82230be1333ddaeee9fcba45f0b288ed4 - RNWatch: a14e378448e187cc12f307f61d41fe8a65400e86 - Sentry: bba998b0fb157fdd6596aa73290a9d67ae47be79 + RNWatch: a36ea17fac675b98b1d8cd41604af68cf1fa9a03 + Sentry: 14bdd673870e8cf64932b149fad5bbbf39a9b390 swift_qrcodejs: 4d024fc98b0778b804ec6a5c810880fd092aec9d TcpSockets: 8d839b9b14f6f344d98e4642ded13ab3112b462d ToolTipMenu: bdcaa0e888bcf44778a67fe34639b094352e904e diff --git a/package-lock.json b/package-lock.json index 1fc24ea3..7ac832e4 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1211,9 +1211,9 @@ "integrity": "sha512-EJGsbrHubK1mGxPjWB74AaHAd5m9I+Gg2RRPZzMK6org7QOU9WOBnIMFqoeVto3hKOaEPlk8NV74H6G34/2pZQ==" }, "@react-native-community/blur": { - "version": "3.3.1", - "resolved": "https://registry.npmjs.org/@react-native-community/blur/-/blur-3.3.1.tgz", - "integrity": "sha512-UfH2ut/l4GpZHeq/TGx3BrmyXSCSBBwBCVx1DhPodP3k959zJ2ajgXa3PiU/qjutftTUw6KH9Frsh2U0ax9dMQ==", + "version": "3.4.1", + "resolved": "https://registry.npmjs.org/@react-native-community/blur/-/blur-3.4.1.tgz", + "integrity": "sha512-XhbS230J7BGuoEamjPFZ5jUWDOW16y+vD0Soyq9Iv1qL8R47esGl54bnfUSMH10WhNXrQzvPxkMzap+ONHpE2w==", "requires": { "prop-types": "^15.5.10" } @@ -1330,9 +1330,9 @@ } }, "@react-native-community/slider": { - "version": "2.0.0-rc.1", - "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-2.0.0-rc.1.tgz", - "integrity": "sha512-hdqQavGovI5M9NjCj4q4SPXyYOEHpBGXLIHBFETyL0S/B96hb09MXZAhOxsPYYs8KamYSKh2IYKwZ8yEiikNSg==" + "version": "2.0.8", + "resolved": "https://registry.npmjs.org/@react-native-community/slider/-/slider-2.0.8.tgz", + "integrity": "sha512-FZC3wjYzHQiD7jT7ALy3QNccyLj9zQBRiKGBFr/QvrWLkVg5orpIJ53aYFXm3eOkNvUV+wjhoI9uCkh3LCN2+A==" }, "@react-navigation/core": { "version": "3.4.2", @@ -1395,13 +1395,13 @@ "from": "git+https://github.com/BlueWallet/react-native-qrcode-local-image.git" }, "@sentry/browser": { - "version": "5.9.1", - "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.9.1.tgz", - "integrity": "sha512-7AOabwp9yAH9h6Xe6TfDwlLxHbUSWs+SPWHI7bPlht2yDSAqkXYGSzRr5X0XQJX9oBQdx2cEPMqHyJrbNaP/og==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/browser/-/browser-5.10.2.tgz", + "integrity": "sha512-r3eyBu2ln7odvWtXARCZPzpuGrKsD6U9F3gKTu4xdFkA0swSLUvS7AC2FUksj/1BE23y+eB/zzPT+RYJ58tidA==", "requires": { - "@sentry/core": "5.8.0", - "@sentry/types": "5.7.1", - "@sentry/utils": "5.8.0", + "@sentry/core": "5.10.2", + "@sentry/types": "5.10.0", + "@sentry/utils": "5.10.2", "tslib": "^1.9.3" } }, @@ -1419,71 +1419,71 @@ } }, "@sentry/core": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.8.0.tgz", - "integrity": "sha512-aAh2KLidIXJVGrxmHSVq2eVKbu7tZiYn5ylW6yzJXFetS5z4MA+JYaSBaG2inVYDEEqqMIkb17TyWxxziUDieg==", - "requires": { - "@sentry/hub": "5.8.0", - "@sentry/minimal": "5.8.0", - "@sentry/types": "5.7.1", - "@sentry/utils": "5.8.0", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/core/-/core-5.10.2.tgz", + "integrity": "sha512-sKVeFH3v8K8xw2vM5MKMnnyAAwih+JSE3pbNL0CcCCA+/SwX+3jeAo2BhgXev2SAR/TjWW+wmeC9TdIW7KyYbg==", + "requires": { + "@sentry/hub": "5.10.2", + "@sentry/minimal": "5.10.2", + "@sentry/types": "5.10.0", + "@sentry/utils": "5.10.2", "tslib": "^1.9.3" } }, "@sentry/hub": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.8.0.tgz", - "integrity": "sha512-VdApn1ZCNwH1wwQwoO6pu53PM/qgHG+DQege0hbByluImpLBhAj9w50nXnF/8KzV4UoMIVbzCb6jXzMRmqqp9A==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/hub/-/hub-5.10.2.tgz", + "integrity": "sha512-hSlZIiu3hcR/I5yEhlpN9C0nip+U7hiRzRzUQaBiHO4YG4TC58NqnOPR89D/ekiuHIXzFpjW9OQmqtAMRoSUYA==", "requires": { - "@sentry/types": "5.7.1", - "@sentry/utils": "5.8.0", + "@sentry/types": "5.10.0", + "@sentry/utils": "5.10.2", "tslib": "^1.9.3" } }, "@sentry/integrations": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-5.8.0.tgz", - "integrity": "sha512-Obe3GqTtq63PAJ4opYEbeZ6Bm8uw+CND+7MywJLDguqnvIVRvxpcJIZ6wxcE/VjbU3OMkNmTMnM+ra8RB7Wj6w==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/integrations/-/integrations-5.10.2.tgz", + "integrity": "sha512-yvIJ6aXpzWlwD1WGTxvaeCm7JmNs4flWXKLlPWm2CEwgWBfjyaWjW7PqlA0jUOnLGCeYzgFD3AdUPlpgCsFXXA==", "requires": { - "@sentry/types": "5.7.1", - "@sentry/utils": "5.8.0", + "@sentry/types": "5.10.0", + "@sentry/utils": "5.10.2", "tslib": "^1.9.3" } }, "@sentry/minimal": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.8.0.tgz", - "integrity": "sha512-MIlFOgd+JvAUrBBmq7vr9ovRH1HvckhnwzHdoUPpKRBN+rQgTyZy1o6+kA2fASCbrRqFCP+Zk7EHMACKg8DpIw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/minimal/-/minimal-5.10.2.tgz", + "integrity": "sha512-GalixiM9sckYfompH5HHTp9XT2BcjawBkcl1DMEKUBEi37+kUq0bivOBmnN1G/I4/wWOUdnAI/kagDWaWpbZPg==", "requires": { - "@sentry/hub": "5.8.0", - "@sentry/types": "5.7.1", + "@sentry/hub": "5.10.2", + "@sentry/types": "5.10.0", "tslib": "^1.9.3" } }, "@sentry/react-native": { - "version": "1.0.9", - "resolved": "https://registry.npmjs.org/@sentry/react-native/-/react-native-1.0.9.tgz", - "integrity": "sha512-fe1KEUJc+N4vq/k0ykqQ3el/CXxwTN7E8kBTYBCvxt9U449FdRodyFduiwz1UrkYhBsaQDC+5vQSZBZyT8EuOA==", + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/@sentry/react-native/-/react-native-1.2.1.tgz", + "integrity": "sha512-JE2B/pMvd7+3TFdzs03+DOdrALAHd8bAphJ8tk+nWjX7oQVJNgVn/IvnJfKxasHHBXQ2z+42Xy9n2Fqam/Gq0w==", "requires": { - "@sentry/browser": "^5.6.3", - "@sentry/core": "^5.6.2", - "@sentry/integrations": "^5.6.1", - "@sentry/types": "^5.6.1", - "@sentry/utils": "^5.6.1", - "@sentry/wizard": "^1.0.0" + "@sentry/browser": "^5.10.0", + "@sentry/core": "^5.10.0", + "@sentry/integrations": "^5.10.0", + "@sentry/types": "^5.10.0", + "@sentry/utils": "^5.10.0", + "@sentry/wizard": "^1.0.2" } }, "@sentry/types": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.7.1.tgz", - "integrity": "sha512-tbUnTYlSliXvnou5D4C8Zr+7/wJrHLbpYX1YkLXuIJRU0NSi81bHMroAuHWILcQKWhVjaV/HZzr7Y/hhWtbXVQ==" + "version": "5.10.0", + "resolved": "https://registry.npmjs.org/@sentry/types/-/types-5.10.0.tgz", + "integrity": "sha512-TW20GzkCWsP6uAxR2JIpIkiitCKyIOfkyDsKBeLqYj4SaZjfvBPnzgNCcYR0L0UsP1/Es6oHooZfIGSkp6GGxQ==" }, "@sentry/utils": { - "version": "5.8.0", - "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.8.0.tgz", - "integrity": "sha512-KDxUvBSYi0/dHMdunbxAxD3389pcQioLtcO6CI6zt/nJXeVFolix66cRraeQvqupdLhvOk/el649W4fCPayTHw==", + "version": "5.10.2", + "resolved": "https://registry.npmjs.org/@sentry/utils/-/utils-5.10.2.tgz", + "integrity": "sha512-UcbbaFpYrGSV448lQ16Cr+W/MPuKUflQQUdrMCt5vgaf5+M7kpozlcji4GGGZUCXIA7oRP93ABoXj55s1OM9zw==", "requires": { - "@sentry/types": "5.7.1", + "@sentry/types": "5.10.0", "tslib": "^1.9.3" } }, @@ -5354,7 +5354,8 @@ }, "ansi-regex": { "version": "2.1.1", - "bundled": true + "bundled": true, + "optional": true }, "aproba": { "version": "1.2.0", @@ -5372,11 +5373,13 @@ }, "balanced-match": { "version": "1.0.0", - "bundled": true + "bundled": true, + "optional": true }, "brace-expansion": { "version": "1.1.11", "bundled": true, + "optional": true, "requires": { "balanced-match": "^1.0.0", "concat-map": "0.0.1" @@ -5389,15 +5392,18 @@ }, "code-point-at": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "concat-map": { "version": "0.0.1", - "bundled": true + "bundled": true, + "optional": true }, "console-control-strings": { "version": "1.1.0", - "bundled": true + "bundled": true, + "optional": true }, "core-util-is": { "version": "1.0.2", @@ -5500,7 +5506,8 @@ }, "inherits": { "version": "2.0.3", - "bundled": true + "bundled": true, + "optional": true }, "ini": { "version": "1.3.5", @@ -5510,6 +5517,7 @@ "is-fullwidth-code-point": { "version": "1.0.0", "bundled": true, + "optional": true, "requires": { "number-is-nan": "^1.0.0" } @@ -5522,17 +5530,20 @@ "minimatch": { "version": "3.0.4", "bundled": true, + "optional": true, "requires": { "brace-expansion": "^1.1.7" } }, "minimist": { "version": "0.0.8", - "bundled": true + "bundled": true, + "optional": true }, "minipass": { "version": "2.3.5", "bundled": true, + "optional": true, "requires": { "safe-buffer": "^5.1.2", "yallist": "^3.0.0" @@ -5549,6 +5560,7 @@ "mkdirp": { "version": "0.5.1", "bundled": true, + "optional": true, "requires": { "minimist": "0.0.8" } @@ -5621,7 +5633,8 @@ }, "number-is-nan": { "version": "1.0.1", - "bundled": true + "bundled": true, + "optional": true }, "object-assign": { "version": "4.1.1", @@ -5631,6 +5644,7 @@ "once": { "version": "1.4.0", "bundled": true, + "optional": true, "requires": { "wrappy": "1" } @@ -5706,7 +5720,8 @@ }, "safe-buffer": { "version": "5.1.2", - "bundled": true + "bundled": true, + "optional": true }, "safer-buffer": { "version": "2.1.2", @@ -5736,6 +5751,7 @@ "string-width": { "version": "1.0.2", "bundled": true, + "optional": true, "requires": { "code-point-at": "^1.0.0", "is-fullwidth-code-point": "^1.0.0", @@ -5753,6 +5769,7 @@ "strip-ansi": { "version": "3.0.1", "bundled": true, + "optional": true, "requires": { "ansi-regex": "^2.0.0" } @@ -5791,11 +5808,13 @@ }, "wrappy": { "version": "1.0.2", - "bundled": true + "bundled": true, + "optional": true }, "yallist": { "version": "3.0.3", - "bundled": true + "bundled": true, + "optional": true } } }, @@ -5902,6 +5921,7 @@ "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-2.0.0.tgz", "integrity": "sha1-gTg9ctsFT8zPUzbaqQLxgvbtuyg=", "dev": true, + "optional": true, "requires": { "is-glob": "^2.0.0" } @@ -6418,7 +6438,8 @@ "version": "1.0.0", "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-1.0.0.tgz", "integrity": "sha1-rEaBd8SUNAWgkvyPKXYMb/xiBsA=", - "dev": true + "dev": true, + "optional": true }, "is-finite": { "version": "1.0.2", @@ -6450,6 +6471,7 @@ "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-2.0.1.tgz", "integrity": "sha1-0Jb5JqPe1WAPP9/ZEZjLCIjC2GM=", "dev": true, + "optional": true, "requires": { "is-extglob": "^1.0.0" } @@ -11046,9 +11068,9 @@ } }, "react-native-quick-actions": { - "version": "0.3.12", - "resolved": "https://registry.npmjs.org/react-native-quick-actions/-/react-native-quick-actions-0.3.12.tgz", - "integrity": "sha512-jQkzbA6L1/+FIqvHnPenHUe2IrBihh48KOMTOa0QbOaxWzsejSB8kkWpSQOjYxjGu7k+3DVgosQ8wGJTB/l4JA==" + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/react-native-quick-actions/-/react-native-quick-actions-0.3.13.tgz", + "integrity": "sha512-Vz13a0+NV0mzCh/29tNt0qDzWPh8i2srTQW8eCSzGFDArnVm1COTOhTD0FY0hWHlxRY0ahvX+BlezTDvsyAuMA==" }, "react-native-randombytes": { "version": "3.5.3", @@ -11254,9 +11276,9 @@ } }, "react-native-watch-connectivity": { - "version": "0.4.1", - "resolved": "https://registry.npmjs.org/react-native-watch-connectivity/-/react-native-watch-connectivity-0.4.1.tgz", - "integrity": "sha512-fMx3hRXinxAoC64YUL+UkXuwlgYeYp3ECKMucxFgRtouzfCC3RGD+wewY7vxgOrcjkKXusIbCdbU4gS2Lojhqw==" + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/react-native-watch-connectivity/-/react-native-watch-connectivity-0.4.2.tgz", + "integrity": "sha512-es/c1yPRc5aQXNjKuNr0nCgYvuD126bGDRAhq5OaKpnccWHGQorctqxKYRKyNjloOM/NGc97C7DDNnfF1cCfJw==" }, "react-native-webview": { "version": "6.9.0", @@ -11468,7 +11490,8 @@ "version": "5.1.2", "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", - "dev": true + "dev": true, + "optional": true }, "string_decoder": { "version": "1.1.1", diff --git a/package.json b/package.json index fc9678ab..c04ba613 100644 --- a/package.json +++ b/package.json @@ -53,10 +53,10 @@ "dependencies": { "@babel/preset-env": "7.5.0", "@react-native-community/async-storage": "1.6.2", - "@react-native-community/blur": "3.3.1", - "@react-native-community/slider": "2.0.0-rc.1", + "@react-native-community/blur": "3.4.1", + "@react-native-community/slider": "2.0.8", "@remobile/react-native-qrcode-local-image": "git+https://github.com/BlueWallet/react-native-qrcode-local-image.git", - "@sentry/react-native": "1.0.9", + "@sentry/react-native": "1.2.1", "amplitude-js": "5.6.0", "bech32": "1.1.3", "bignumber.js": "9.0.0", @@ -108,7 +108,7 @@ "react-native-privacy-snapshot": "git+https://github.com/BlueWallet/react-native-privacy-snapshot.git", "react-native-prompt-android": "git+https://github.com/marcosrdz/react-native-prompt-android.git", "react-native-qrcode-svg": "5.1.2", - "react-native-quick-actions": "0.3.12", + "react-native-quick-actions": "0.3.13", "react-native-randombytes": "3.5.3", "react-native-rate": "1.1.7", "react-native-secure-key-store": "git+https://github.com/marcosrdz/react-native-secure-key-store.git#38332f629f577cdd57c69fc8cc971b3cbad193c9", @@ -119,7 +119,7 @@ "react-native-tcp": "git+https://github.com/aprock/react-native-tcp.git", "react-native-tooltip": "git+https://github.com/marcosrdz/react-native-tooltip.git", "react-native-vector-icons": "6.6.0", - "react-native-watch-connectivity": "0.4.1", + "react-native-watch-connectivity": "0.4.2", "react-native-webview": "6.9.0", "react-navigation": "3.11.0", "react-navigation-hooks": "1.1.0", From 8889d5d347ac3e0c3a3284d7df187ec3792db33e Mon Sep 17 00:00:00 2001 From: Nicholas Chen Date: Wed, 1 Jan 2020 19:22:26 -0500 Subject: [PATCH 2/4] updating instructions for console compilation refer here for more information: https://github.com/BlueWallet/BlueWallet/issues/802 --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 57713590..6c550245 100644 --- a/README.md +++ b/README.md @@ -38,6 +38,22 @@ cd BlueWallet npm install ``` +Please make sure that your console is running the most stable versions of npm and node (even-numbered versions). + +``` +npm --version && node --version +``` + +If not, please change your node version in the shell, assuming you have installed node and npm via the Homebrew Package Manager. + +``` +brew install node@12 +brew unlink node +brew link node@12 +``` + +For more information and background information, please refer to this link: https://apple.stackexchange.com/questions/171530/how-do-i-downgrade-node-or-install-a-specific-previous-version-using-homebrew + * To run on Android: You will now need to either connect an Android device to your computer or run an emulated Android device using AVD Manager which comes shipped with Android Studio. To run an emulator using AVD Manager: From e900e6e50e8b310c067f130877028eec5d8ac655 Mon Sep 17 00:00:00 2001 From: Nicholas Chen Date: Fri, 3 Jan 2020 18:59:47 -0500 Subject: [PATCH 3/4] Updated to make docs to make it more precise --- README.md | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) diff --git a/README.md b/README.md index 6c550245..6e74e0d4 100644 --- a/README.md +++ b/README.md @@ -25,10 +25,15 @@ Community: [telegram group](https://t.me/bluewallet) +## BUILD & RUN IT +Please refer to the engines field in package.json file for the minimum required versions of Node and npm. It is preferred that you use an even-numbered version of Node as these are LTS versions. +To view the version of Node and npm in your environment, run the following in your console: -## BUILD & RUN IT +``` +node --version && npm --version +``` * In your console: @@ -40,20 +45,6 @@ npm install Please make sure that your console is running the most stable versions of npm and node (even-numbered versions). -``` -npm --version && node --version -``` - -If not, please change your node version in the shell, assuming you have installed node and npm via the Homebrew Package Manager. - -``` -brew install node@12 -brew unlink node -brew link node@12 -``` - -For more information and background information, please refer to this link: https://apple.stackexchange.com/questions/171530/how-do-i-downgrade-node-or-install-a-specific-previous-version-using-homebrew - * To run on Android: You will now need to either connect an Android device to your computer or run an emulated Android device using AVD Manager which comes shipped with Android Studio. To run an emulator using AVD Manager: From 2ec19bdec42864a24048b4e046cfc8c07706292b Mon Sep 17 00:00:00 2001 From: Marcos Rodriguez Date: Wed, 1 Jan 2020 23:32:35 -0600 Subject: [PATCH 4/4] REF: SelectWallet uses Hooks --- screen/wallets/selectWallet.js | 116 +++++++++++++-------------------- 1 file changed, 45 insertions(+), 71 deletions(-) diff --git a/screen/wallets/selectWallet.js b/screen/wallets/selectWallet.js index e409c783..3141e324 100644 --- a/screen/wallets/selectWallet.js +++ b/screen/wallets/selectWallet.js @@ -1,51 +1,35 @@ -import React, { Component } from 'react'; +/* eslint-disable react/prop-types */ +import React, { useEffect, useState } from 'react'; import { View, ActivityIndicator, Image, Text, TouchableOpacity, FlatList } from 'react-native'; import { SafeBlueArea, BlueNavigationStyle, BlueText, BlueSpacing20, BluePrivateBalance } from '../../BlueComponents'; import LinearGradient from 'react-native-linear-gradient'; -import PropTypes from 'prop-types'; import { LightningCustodianWallet } from '../../class/lightning-custodian-wallet'; import ReactNativeHapticFeedback from 'react-native-haptic-feedback'; import WalletGradient from '../../class/walletGradient'; +import { useNavigationParam } from 'react-navigation-hooks'; +import { Chain } from '../../models/bitcoinUnits'; /** @type {AppStorage} */ -let BlueApp = require('../../BlueApp'); -let loc = require('../../loc'); +const BlueApp = require('../../BlueApp'); +const loc = require('../../loc'); -export default class SelectWallet extends Component { - static navigationOptions = ({ navigation }) => ({ - ...BlueNavigationStyle(navigation, true, navigation.getParam('dismissAcion')), - title: loc.wallets.select_wallet, - }); - - constructor(props) { - super(props); - props.navigation.setParams({ dismissAcion: this.dismissComponent }); - this.state = { - isLoading: true, - data: [], - }; - this.chainType = props.navigation.getParam('chainType'); - } - - dismissComponent = () => { - this.props.navigation.goBack(null); - }; +const SelectWallet = () => { + const chainType = useNavigationParam('chainType') || Chain.ONCHAIN; + const onWalletSelect = useNavigationParam('onWalletSelect'); + const [isLoading, setIsLoading] = useState(true); + const data = chainType + ? BlueApp.getWallets().filter(item => item.chain === chainType && item.allowSend()) + : BlueApp.getWallets().filter(item => item.allowSend()) || []; - componentDidMount() { - const wallets = this.chainType - ? BlueApp.getWallets().filter(item => item.chain === this.chainType && item.allowSend()) - : BlueApp.getWallets().filter(item => item.allowSend()); - this.setState({ - data: wallets, - isLoading: false, - }); - } + useEffect(() => { + setIsLoading(false); + }); - _renderItem = ({ item }) => { + const renderItem = ({ item }) => { return ( { ReactNativeHapticFeedback.trigger('selection', { ignoreAndroidSystemSettings: false }); - this.props.navigation.getParam('onWalletSelect')(item); + onWalletSelect(item); }} > - + if (isLoading) { + return ( + + + + ); + } else if (data.length <= 0) { + return ( + + + There are currently no Bitcoin wallets available. + + + A Bitcoin wallet is required to refill Lightning wallets. Please, create or import one. + - ); - } else if (this.state.data.length <= 0) { - return ( - - - There are currently no Bitcoin wallets available. - - - A Bitcoin wallet is required to refill Lightning wallets. Please, create or import one. - - - - ); - } - + + ); + } else { return ( - - `${index}`} - /> + + `${index}`} /> ); } -} - -SelectWallet.propTypes = { - navigation: PropTypes.shape({ - navigate: PropTypes.func, - goBack: PropTypes.func, - setParams: PropTypes.func, - getParam: PropTypes.func, - }), }; + +SelectWallet.navigationOptions = ({ navigation }) => ({ + ...BlueNavigationStyle(navigation, true, () => navigation.goBack(null)), + title: loc.wallets.select_wallet, +}); + +export default SelectWallet;