TONS of work in shapeshift integration
This commit is contained in:
parent
8e2263cc9a
commit
b16a4215d2
14 changed files with 267 additions and 58 deletions
|
|
@ -45,6 +45,11 @@
|
|||
</div>
|
||||
</div>
|
||||
|
||||
<div ng-if="minShapeshiftAmount && maxShapeshiftAmount">
|
||||
Minimum amount: {{minShapeshiftAmount}} <br/>
|
||||
Maximum amount: {{maxShapeshiftAmount}}
|
||||
</div>
|
||||
|
||||
<div class="amount">
|
||||
<div class="amount__editable" ng-class="{'amount__editable--minimize': smallFont, 'amount__editable--standard': !smallFont, 'amount__editable--placeholder': !amount}">
|
||||
<span class="amount__number">{{amount || "0.00" }}</span>
|
||||
|
|
|
|||
2
www/views/includes/fromWalletIcon.html
Normal file
2
www/views/includes/fromWalletIcon.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<img ng-if="fromWallet.network == 'testnet'" src="img/icon-wallet-testnet.svg" ng-class="{'wallet-background-color-default': !fromWallet.color}" ng-style="{'background-color': fromWallet.color}" class="bg"/>
|
||||
<img ng-if="fromWallet.network != 'testnet'" src="img/icon-wallet.svg" ng-class="{'wallet-background-color-default': !fromWallet.color}" ng-style="{'background-color': fromWallet.color}" class="bg"/>
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
<div>
|
||||
<div ng-hide="direction=='in' || direction=='out'">
|
||||
<div>
|
||||
<select ng-model="selectedCoinModel.coin" ng-change="getMarketData(selectedCoinModel.coin)">
|
||||
<option ng-repeat="(k, coin) in coins" value="{{coin.symbol}}">
|
||||
|
|
@ -12,14 +12,14 @@
|
|||
<label>{{ label }}</label>
|
||||
<input type="text" ng-model="coinAddress">
|
||||
</div>
|
||||
<div ng-show="direction=='out'">
|
||||
<div ng-show="direction=='in'">
|
||||
<label>Amount</label>
|
||||
<input type="text" ng-model="amount">
|
||||
</div>
|
||||
</div>
|
||||
<div ng-if="direction=='in'">
|
||||
<div>Deposit Limit: {{marketData.limit}}</div>
|
||||
<div>Minimum Amount: {{marketData.minimum}}</div>
|
||||
<div>Maximum Amount: {{marketData.limit}}</div>
|
||||
<div>MinerFee: {{marketData.minerFee}}</div>
|
||||
<div>Rate: {{marketData.rate}}</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<div>
|
||||
<div>
|
||||
<button type="button" ng-click="shiftIt()">{{ShiftState}}</button>
|
||||
<button type="button" class="button button-standard button-primary" ng-click="shiftIt()">
|
||||
{{ShiftState}}
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
2
www/views/includes/toWalletIcon.html
Normal file
2
www/views/includes/toWalletIcon.html
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
<img ng-if="toWallet.network == 'testnet'" src="img/icon-wallet-testnet.svg" ng-class="{'wallet-background-color-default': !toWallet.color}" ng-style="{'background-color': toWallet.color}" class="bg"/>
|
||||
<img ng-if="toWallet.network != 'testnet'" src="img/icon-wallet.svg" ng-class="{'wallet-background-color-default': !toWallet.color}" ng-style="{'background-color': toWallet.color}" class="bg"/>
|
||||
104
www/views/shapeshift.html
Normal file
104
www/views/shapeshift.html
Normal file
|
|
@ -0,0 +1,104 @@
|
|||
<ion-view class="settings" show-tabs>
|
||||
<ion-nav-bar class="bar-royal">
|
||||
<ion-nav-title>
|
||||
{{'Shapeshift'|translate}}
|
||||
</ion-nav-title>
|
||||
<ion-nav-back-button>
|
||||
</ion-nav-back-button>
|
||||
</ion-nav-bar>
|
||||
<ion-content>
|
||||
<shapeshift-coin-trader>
|
||||
<div class="send-header-wrapper shapeshift-banner">
|
||||
<img class="shapeshift-logo" src="img/shapeshiftlogo.svg"/>
|
||||
</div>
|
||||
<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"
|
||||
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"
|
||||
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-wallets="fromWallets"
|
||||
wallet-selector-selected-wallet="fromWallet"
|
||||
wallet-selector-show="showFromWallets"
|
||||
wallet-selector-on-select="onFromWalletSelect">
|
||||
</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>
|
||||
</ion-view>
|
||||
|
|
@ -97,5 +97,8 @@
|
|||
<div class="ng-hide list card" ng-show="walletsBtc[0] && buyAndSellItems.length>0" ng-include="'views/includes/buyAndSellCard.html'"></div>
|
||||
<div class="ng-hide list card" ng-show="homeIntegrations.length>0" ng-include="'views/includes/homeIntegrations.html'"></div>
|
||||
<div class="ng-hide list card" ng-show="nextStepsItems.length>0 && !isWindowsPhoneApp" ng-include="'views/includes/nextSteps.html'"></div>
|
||||
<div class="list card">
|
||||
<a class="item item-icon-right item-heading" ui-sref="tabs.shapeshift">Shapeshift</a>
|
||||
</div>
|
||||
</ion-content>
|
||||
</ion-view>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue