diff --git a/app-template/package-template.json b/app-template/package-template.json index 0aa5da5dc..c42ef81b4 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", @@ -141,4 +141,4 @@ "pre-commit": "^1.1.3" }, "pre-commit": "unstage-package" -} \ No newline at end of file +} 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" } } diff --git a/fix-asn1.sh b/fix-asn1.sh new file mode 100755 index 000000000..1dbca6a67 --- /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 "node_modules/asn1.js-rfc5280/index.js fixed" +fi \ No newline at end of file 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 61ad0952e..5d6dd3780 100644 --- a/www/views/shapeshift.html +++ b/www/views/shapeshift.html @@ -23,107 +23,11 @@
To get started, you'll need to create a bitcoin wallet and get some bitcoin.
+
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 -
- - -
- To -
- -
- Rate: {{rateString}} -
-
- - - -
- - - - - -
- - - - - - - - - - - - - - - - - - -