From acee3024a9ce0c0bf8bf0f7f1da2431b755ec103 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:08 +0900 Subject: [PATCH 01/13] Quick fix for asn1 --- app-template/package-template.json | 2 +- fix-asn1.sh | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100755 fix-asn1.sh diff --git a/app-template/package-template.json b/app-template/package-template.json index 0aa5da5dc..dd714d43f 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -122,7 +122,7 @@ "sign:android": "rm -f platforms/android/build/outputs/apk/android-release-signed-aligned.apk; jarsigner -verbose -sigalg SHA1withRSA -digestalg SHA1 -keystore ../bitcoin-com-release-key.jks -signedjar platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-unsigned.apk bitcoin-com && zipalign -v 4 platforms/android/build/outputs/apk/android-release-signed.apk platforms/android/build/outputs/apk/android-release-signed-aligned.apk", "apply:copay": "npm i fs-extra && cd app-template && node apply.js copay && npm i && cordova prepare", "apply:bitpay": "npm i fs-extra && cd app-template && node apply.js bitpay && npm i && cordova prepare", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh", "test": "karma start test/karma.conf.js --single-run", "clean": "trash platforms && trash plugins && cordova prepare", "unstage-package": "git reset package.json", diff --git a/fix-asn1.sh b/fix-asn1.sh new file mode 100755 index 000000000..40c847b3f --- /dev/null +++ b/fix-asn1.sh @@ -0,0 +1,11 @@ +#!/bin/bash + +firstLine=`awk 'NR < 2 {print}' node_modules/asn1.js-rfc5280/index.js` + +if [ "$firstLine" = "try {" ]; then + echo "var asn1 = require('asn1.js');" > node_modules/asn1.js-rfc5280/index.new.js + awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js + rm node_modules/asn1.js-rfc5280/index.js + mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js + echo "[log] node_modules/asn1.js-rfc5280/index.js fixed" +fi \ No newline at end of file From 56be096207f49ee0f94d7a071bdf01bc8081da5d Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:20 +0900 Subject: [PATCH 02/13] quick fix for asn1 From e6ae1c052054f0c86e0022d969f23cbba41bbe59 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:51:59 +0900 Subject: [PATCH 03/13] Add the command in package.json From e8f7126c89f1c1611a34f057e679a0fb5050d8e1 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:52:23 +0900 Subject: [PATCH 04/13] package.json From eee1a69d84a7f415552b60405295ecfb9d051504 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Thu, 16 Aug 2018 17:54:51 +0900 Subject: [PATCH 05/13] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1f37b2e6..e1a181308 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postinstall": "npm run apply:copay && echo && echo \"Repo configured for standard Copay distribution. To switch to the BitPay distribution, run 'npm run apply:bitpay'.\" && echo", "start": "echo && echo \"Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo", "apply:copay": "npm i fs-extra@0.30 && cd app-template && node apply.js copay && cd .. && npm i", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd .. && ./fix-asn1.sh", "apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i", "unstage-package": "git reset package.json", "clean-all": "git clean -dfx" From aa75ba18d6ad3b8440ffd3f1c6014cd260b8020e Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 11:45:43 +1200 Subject: [PATCH 06/13] Removed old content. --- www/views/shapeshift.html | 97 --------------------------------------- 1 file changed, 97 deletions(-) diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 61ad0952e..94a679f7b 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -29,101 +29,4 @@
This service is provided by the third-party ShapeShift, who will charge a small fee for the service. The fee will be shown before you start the transaction.
- - - - - - -
- - - - - -
- - - - - - - - - - - - - - - - - - - From b3e34483b672b0cee628b1a97c56efd59c137021 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 11:59:27 +1200 Subject: [PATCH 07/13] Show my address button. --- src/js/controllers/shapeshift.js | 17 +++++++++-------- www/views/shapeshift.html | 1 + 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/src/js/controllers/shapeshift.js b/src/js/controllers/shapeshift.js index 3538ebe1a..43e0790d1 100644 --- a/src/js/controllers/shapeshift.js +++ b/src/js/controllers/shapeshift.js @@ -4,6 +4,8 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi var walletsBtc = []; var walletsBch = []; + $scope.showMyAddress = showMyAddress; + function generateAddress(wallet, cb) { if (!wallet) return; walletService.getAddress(wallet, false, function(err, addr) { @@ -41,14 +43,6 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi $ionicNavBarDelegate.showBar(true); }); - $scope.showFromWalletSelector = function() { - $scope.showFromWallets = true; - }; - - $scope.showToWalletSelector = function() { - $scope.showToWallets = true; - }; - // This could probably be enhanced refactoring the routes abstract states $scope.createWallet = function() { $state.go('tabs.home').then(function() { @@ -81,4 +75,11 @@ angular.module('copayApp.controllers').controller('shapeshiftController', functi }); }); } + + function showMyAddress() { + $state.go('tabs.home').then(function() { + $state.go('tabs.receive'); + }); + } + }); diff --git a/www/views/shapeshift.html b/www/views/shapeshift.html index 94a679f7b..5d6dd3780 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -23,6 +23,7 @@
To get started, you'll need to create a bitcoin wallet and get some bitcoin.
+
From 26891f6e47f6b15150a6589d9bfdf9326670f1f0 Mon Sep 17 00:00:00 2001 From: Brendon Duncan Date: Fri, 17 Aug 2018 16:54:04 +1200 Subject: [PATCH 08/13] Cleaned up log message. --- fix-asn1.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fix-asn1.sh b/fix-asn1.sh index 40c847b3f..1dbca6a67 100755 --- a/fix-asn1.sh +++ b/fix-asn1.sh @@ -7,5 +7,5 @@ if [ "$firstLine" = "try {" ]; then awk 'NR > 6 {print}' node_modules/asn1.js-rfc5280/index.js >> node_modules/asn1.js-rfc5280/index.new.js rm node_modules/asn1.js-rfc5280/index.js mv node_modules/asn1.js-rfc5280/index.new.js node_modules/asn1.js-rfc5280/index.js - echo "[log] node_modules/asn1.js-rfc5280/index.js fixed" + echo "node_modules/asn1.js-rfc5280/index.js fixed" fi \ No newline at end of file From a67f9acbc6566bd4ebd4428fd4ab02b83b28967a Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 00:51:08 +0900 Subject: [PATCH 09/13] Resolution package --- app-template/package-template.json | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app-template/package-template.json b/app-template/package-template.json index 232ac7e1f..616658b92 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -140,5 +140,9 @@ "lodash": "^4.17.4", "pre-commit": "^1.1.3" }, + "resolutions": { + "angular": "1.5.3", + "ionic": "1b7414faba" + }, "pre-commit": "unstage-package" } \ No newline at end of file From 6dcc221ee12727584d2652c49ce91048f66acaa3 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 01:17:04 +0900 Subject: [PATCH 10/13] ionic resolution --- app-template/package-template.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app-template/package-template.json b/app-template/package-template.json index 8c2bd05d0..660dc81bb 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -142,7 +142,7 @@ }, "resolutions": { "angular": "1.5.3", - "ionic": "1b7414faba" + "ionic": "eefba1331b" }, "pre-commit": "unstage-package" } \ No newline at end of file From 154e495846c9387968d66afb2dc942bd6fee25c4 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 01:29:04 +0900 Subject: [PATCH 11/13] Update package.json --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c1f37b2e6..e54e3d14d 100644 --- a/package.json +++ b/package.json @@ -8,7 +8,7 @@ "postinstall": "npm run apply:copay && echo && echo \"Repo configured for standard Copay distribution. To switch to the BitPay distribution, run 'npm run apply:bitpay'.\" && echo", "start": "echo && echo \"Choose a distribution by running 'npm run apply:copay' or 'npm run apply:bitpay'.\" && echo", "apply:copay": "npm i fs-extra@0.30 && cd app-template && node apply.js copay && cd .. && npm i", - "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare", + "apply:bitcoincom": "npm i fs-extra && cd app-template && node apply.js bitcoincom && npm i && cordova prepare && cd ../ && ./fix-asn1.sh", "apply:bitpay": "npm i fs-extra@0.30 && cd app-template && node apply.js bitpay && cd .. && npm i", "unstage-package": "git reset package.json", "clean-all": "git clean -dfx" From f4346fd921f0756c0d675addf679d58550f652c8 Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 02:02:50 +0900 Subject: [PATCH 12/13] Update bower.json --- bower.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bower.json b/bower.json index 08a82d9b8..d94800d24 100644 --- a/bower.json +++ b/bower.json @@ -24,6 +24,6 @@ }, "resolutions": { "angular": "1.5.3", - "ionic": "1b7414faba" + "ionic": "eefba1331b" } } From d06e9f7088eee701f01caa1279a3c92333807f5b Mon Sep 17 00:00:00 2001 From: Jean-Baptiste Dominguez Date: Sat, 18 Aug 2018 02:03:23 +0900 Subject: [PATCH 13/13] Update package-template.json --- app-template/package-template.json | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app-template/package-template.json b/app-template/package-template.json index 660dc81bb..c42ef81b4 100644 --- a/app-template/package-template.json +++ b/app-template/package-template.json @@ -140,9 +140,5 @@ "lodash": "^4.17.4", "pre-commit": "^1.1.3" }, - "resolutions": { - "angular": "1.5.3", - "ionic": "eefba1331b" - }, "pre-commit": "unstage-package" -} \ No newline at end of file +}