Third Party Service integration (Shapeshift) (CSS + translations + wallet selector + routes)

This commit is contained in:
Sebastiaan Pasma 2018-07-31 17:21:56 +02:00
commit 42d77903e1
No known key found for this signature in database
GPG key ID: 9A2B0C8B95A1D26F
9 changed files with 143 additions and 129 deletions

View file

@ -0,0 +1,3 @@
<div class="send-header-wrapper shapeshift-banner">
<img class="shapeshift-logo" src="img/shapeshiftlogo.svg"/>
</div>

View file

@ -31,83 +31,85 @@
</div>
</div>
</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>-->
<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>
<!--<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>-->
<!--&nbsp;-->
<!--</p>-->
<!--<i ng-if="!singleFromWallet" class="icon bp-arrow-right"></i>-->
<!--</a>-->
<!--</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>
<!--<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="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>
&nbsp;
</p>
<i ng-if="!singleFromWallet" class="icon bp-arrow-right"></i>
</a>
</div>
<!--<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>-->
<!--&nbsp;-->
<!--</p>-->
<!--<i ng-if="!singleToWallet" class="icon bp-arrow-right"></i>-->
<!--</a>-->
<!--</div>-->
<!--<div class="item item-heading">-->
<!--Rate: {{rateString}}-->
<!--</div>-->
<!--</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>
<!--<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>-->
<!--&lt;!&ndash;<shapeshift-coin-deposit-info deposit-status="DepositStatus" deposit-info="depositInfo"></shapeshift-coin-deposit-info>&ndash;&gt;-->
<!--<shapeshift-coin-shift-button shift-it="shiftIt" shift-state="ShiftState"></shapeshift-coin-shift-button>-->
<!--</shapeshift-coin-trader>-->
<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>
&nbsp;
</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-->

View file

@ -4,6 +4,7 @@
<ion-nav-back-button ng-click="goBack()"></ion-nav-back-button>
</ion-nav-bar>
<ion-content>
<div ng-if="thirdParty && thirdParty.id === 'shapeshift'" ng-include="'views/header-thirdparty.html'"></div>
<div class="header--request" ng-if="isPaymentRequest">
<div class="header--request__title" translate>Paying</div>
<div class="header--request__amount" translate>$... USD</div>
@ -14,7 +15,7 @@
{{headerTitle}}
</div>
</div>
<div class="list card">
<div class="list card" ng-if="walletsBch.length > 0">
<div class="item item-icon-right item-heading">
<div translate>Bitcoin Cash (BCH)</div>
<div translate class="subtitle">Instant transactions with low fees</div>
@ -35,7 +36,7 @@
<div>
<a ng-repeat="wallet in walletsBtc track by $index"
class="item item-sub item-icon-left item-big-icon-left item-icon-right wallet"
ng-click="openWallet(wallet)">
ng-click="useWallet(wallet)">
<span ng-include="'views/includes/walletList.html'"></span>
</a>
</div>