Merge sprint/21.
This commit is contained in:
commit
ba98fbe187
5 changed files with 24 additions and 108 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -24,6 +24,6 @@
|
|||
},
|
||||
"resolutions": {
|
||||
"angular": "1.5.3",
|
||||
"ionic": "1b7414faba"
|
||||
"ionic": "eefba1331b"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
11
fix-asn1.sh
Executable file
11
fix-asn1.sh
Executable file
|
|
@ -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
|
||||
|
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
});
|
||||
|
|
|
|||
|
|
@ -23,107 +23,11 @@
|
|||
<div ng-show="!hasWallets" translate>To get started, you'll need to create a bitcoin wallet and get some bitcoin.</div>
|
||||
<div class="padding buttons">
|
||||
<button class="button button-standard button-green" ng-click="buyBitcoin()" ng-show="!walletsWithFunds.length" translate>Buy Bitcoin now</button>
|
||||
<button class="button button-standard button-white" ng-click="showMyAddress()" ng-show="!walletsWithFunds.length" translate>Show my address</button>
|
||||
<button class="button button-standard button-green" ng-click="createWallet()" ng-show="!hasWallets" translate>Create bitcoin wallet</button>
|
||||
<button class="button button-standard button-shapeshift track_shapeshift_start_click" ng-click="shapeshift()" ng-show="walletsWithFunds.length" translate>Start ShapeShift</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="third-party-notice" translate>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.</div>
|
||||
|
||||
<shapeshift-coin-trader class="ng-hide" ng-show="fromWallets.length > 0 && toWallets.length > 0">
|
||||
<div class="list card">
|
||||
<div class="item item-heading">
|
||||
<span translate><strong>From</strong></span>
|
||||
</div>
|
||||
<div class="item wallet-selector" ng-click="showFromWalletSelector()" ng-if="fromWallet">
|
||||
<a ng-if="fromWallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
|
||||
<i class="icon big-icon-svg" ng-include="'views/includes/fromWalletIcon.html'"></i>
|
||||
<span>
|
||||
{{fromWallet.name || fromWallet.id}}
|
||||
</span>
|
||||
<p>
|
||||
<span ng-if="!fromWallet.balanceHidden"> {{fromWallet.status.totalBalanceStr}} </span>
|
||||
|
||||
<span ng-if="fromWallet.balanceHidden" translate>[Balance Hidden]</span>
|
||||
<span class="tab-home__wallet__multisig-number" ng-if="fromWallet.n > 1">
|
||||
{{fromWallet.m}}-of-{{fromWallet.n}}
|
||||
</span>
|
||||
<span class="assertive" ng-if="fromWallet.error">{{fromWallet.error}}</span>
|
||||
|
||||
</p>
|
||||
<i ng-if="!singleFromWallet" class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
|
||||
<div class="item item-heading">
|
||||
<span translate><strong>To</strong></span>
|
||||
</div>
|
||||
<div class="item wallet-selector" ng-click="showToWalletSelector()" ng-if="toWallet">
|
||||
<a ng-if="toWallet" class="item item-sub item-icon-left item-big-icon-left item-icon-right">
|
||||
<i class="icon big-icon-svg" ng-include="'views/includes/toWalletIcon.html'"></i>
|
||||
<span>
|
||||
{{toWallet.name || toWallet.id}}
|
||||
</span>
|
||||
<p>
|
||||
<span ng-if="!toWallet.balanceHidden"> {{toWallet.status.totalBalanceStr}} </span>
|
||||
|
||||
<span ng-if="toWallet.balanceHidden" translate>[Balance Hidden]</span>
|
||||
<span class="tab-home__wallet__multisig-number" ng-if="toWallet.n > 1">
|
||||
{{toWallet.m}}-of-{{toWallet.n}}
|
||||
</span>
|
||||
<span class="assertive" ng-if="toWallet.error">{{toWallet.error}}</span>
|
||||
|
||||
</p>
|
||||
<i ng-if="!singleToWallet" class="icon bp-arrow-right"></i>
|
||||
</a>
|
||||
</div>
|
||||
<div class="item item-heading">
|
||||
Rate: {{rateString}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<shapeshift-coin-selector
|
||||
coins="coins"
|
||||
label="'Return Address'"
|
||||
get-market-data="getMarketDataIn"
|
||||
market-data="marketData"
|
||||
selected-coin="fromWallet.coin"
|
||||
coin-address="fromWalletAddress"
|
||||
wallet-id="fromWallet.id"
|
||||
amount="amount"
|
||||
direction="'in'">
|
||||
</shapeshift-coin-selector>
|
||||
<br/>
|
||||
<shapeshift-coin-selector
|
||||
coins="coins"
|
||||
label="'Withdrawal Address'"
|
||||
get-market-data="getMarketDataOut"
|
||||
selected-coin="toWallet.coin"
|
||||
coin-address="toWalletAddress"
|
||||
wallet-id="toWallet.id"
|
||||
direction="'out'">
|
||||
</shapeshift-coin-selector>
|
||||
<shapeshift-coin-error ssError="ssError"></shapeshift-coin-error>
|
||||
<!--<shapeshift-coin-deposit-info deposit-status="DepositStatus" deposit-info="depositInfo"></shapeshift-coin-deposit-info>-->
|
||||
<shapeshift-coin-shift-button shift-it="shiftIt" shift-state="ShiftState"></shapeshift-coin-shift-button>
|
||||
</shapeshift-coin-trader>
|
||||
</ion-content>
|
||||
|
||||
<!--<wallet-selector-->
|
||||
<!--wallet-selector-title="fromWalletSelectorTitle"-->
|
||||
<!--wallet-selector-wallets="fromWallets"-->
|
||||
<!--wallet-selector-selected-wallet="fromWallet"-->
|
||||
<!--wallet-selector-show="showFromWallets"-->
|
||||
<!--wallet-selector-on-select="onFromWalletSelect"-->
|
||||
<!--wallet-selector-always-display-bitcoin-core="true">-->
|
||||
<!--</wallet-selector>-->
|
||||
|
||||
<!--<wallet-selector-->
|
||||
<!--wallet-selector-title="toWalletSelectorTitle"-->
|
||||
<!--wallet-selector-wallets="toWallets"-->
|
||||
<!--wallet-selector-selected-wallet="toWallet"-->
|
||||
<!--wallet-selector-show="showToWallets"-->
|
||||
<!--wallet-selector-on-select="onToWalletSelect"-->
|
||||
<!--wallet-selector-always-display-bitcoin-core="true">-->
|
||||
<!--</wallet-selector>-->
|
||||
<!--</ion-view>-->
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue