2017-01-12 15:29:34 -08:00
< ion-view id = "coinbase" hide-tabs >
< ion-nav-bar class = "bar-royal" >
< ion-nav-back-button >
< / ion-nav-back-button >
< ion-nav-title > Sell bitcoin< / ion-nav-title >
< / ion-nav-bar >
< ion-content class = "add-bottom-for-cta" >
<!-- SELL -->
2017-01-13 06:00:04 -08:00
< div class = "list" ng-if = "sellRequestInfo" >
< div class = "item head" >
< div class = "sending-label" >
< img src = "img/sell-bitcoin.svg" alt = "sell bitcoin" width = "35" class = "item-img-sell" >
< span > Selling< / span >
< / div >
< div class = "amount-label" >
< div class = "amount" > {{sellRequestInfo.amount.amount}} {{sellRequestInfo.amount.currency}}< / div >
< div class = "alternative" > {{sellRequestInfo.subtotal.amount}} {{sellRequestInfo.subtotal.currency}}< / div >
< / div >
< / div >
< div class = "info" >
< div class = "item item-icon-right" ng-click = "showWalletSelector()" >
< div class = "label" > From< / div >
< div class = "wallet" >
< i class = "icon big-icon-svg" >
< img src = "img/icon-wallet.svg" ng-style = "{'background-color': wallet.color}" class = "bg" >
< / i >
{{wallet ? wallet.name : '...'}}
< / div >
< i class = "icon bp-arrow-right" > < / i >
2017-01-12 15:29:34 -08:00
< / div >
2017-01-13 06:00:04 -08:00
< label class = "item item-input item-select" >
< div class = "input-label" >
Deposit into
< / div >
< select ng-model = "selectedPaymentMethodId.value"
ng-options="item.id as item.name for item in paymentMethods"
ng-change="sellRequest()">
< / select >
< / label >
2017-01-12 15:29:34 -08:00
< div class = "item item-divider" >
At what percentage lower price would you accept to sell?
< / div >
< label class = "item item-input item-select" ng-if = "priceSensitivity" >
< div class = "input-label" > Price Sensitivity< / div >
< select
ng-model="selectedPriceSensitivity.data"
ng-options="item as item.name for item in priceSensitivity track by item.value">
< / select >
< / label >
< div class = "item size-12" ng-if = "selectedPriceSensitivity" >
< div class = "m10b" >
Coinbase has not yet implemented an immediate method to sell bitcoin from a wallet. To make this sale, funds
will be sent to your Coinbase account, and sold when Coinbase accepts the transaction (usually one
hour).
< / div >
< div class = "label" ng-if = "sellRequestInfo" > Estimated sale value:
< strong >
{{sellRequestInfo.total.amount | currency : '' : 2}}
{{sellRequestInfo.total.currency}}
< / strong >
< / div >
< div class = "label" ng-if = "sellRequestInfo" > Still sell if price fall until:
< strong >
{{(sellRequestInfo.total.amount -
(selectedPriceSensitivity.data.value / 100) * sellRequestInfo.total.amount) | currency : '' : 2}}
{{sellRequestInfo.total.currency}}
< / strong >
< / div >
< / div >
< div class = "item item-divider" >
2017-01-13 06:00:04 -08:00
Total to receive
2017-01-12 15:29:34 -08:00
< / div >
< div class = "item" ng-repeat = "fee in sellRequestInfo.fees" >
2017-01-13 06:00:04 -08:00
< span class = "capitalized" >
{{fee.type}}
2017-01-12 15:29:34 -08:00
< / span >
< span class = "item-note" >
2017-01-13 06:00:04 -08:00
< span ng-if = "fee.amount.amount != '0.00'" > -< / span >
{{fee.amount.amount}} {{fee.amount.currency}}
2017-01-12 15:29:34 -08:00
< / span >
< / div >
< div class = "item" >
Total
< span class = "item-note" >
{{sellRequestInfo.total.amount}} {{sellRequestInfo.total.currency}}
< / span >
< / div >
< / div >
< / div >
< / ion-content >
< click-to-accept
ng-disabled="!selectedPaymentMethodId.value || !sellRequestInfo || !wallet"
ng-click="sellConfirm()"
ng-if="!isCordova & & sellRequestInfo"
click-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="!selectedPaymentMethodId.value"
no-matching-wallet="!sellRequestInfo">
Confirm sale
< / click-to-accept >
< slide-to-accept
ng-disabled="!selectedPaymentMethodId.value || !sellRequestInfo || !wallet"
ng-if="isCordova & & sellRequestInfo"
slide-on-confirm="sellConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="!selectedPaymentMethodId.value"
no-matching-wallet="!sellRequestInfo">
Slide to sell
< / slide-to-accept >
< slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="goBackHome()"
slide-success-hide-on-confirm="true">
< span > Funds sent to Coinbase Account< / span >
< div class = "m10 size-14" >
The transaction is not yet confirmed, and will show as "Pending" in your Activity. The bitcoin sale will be completed automatically once it is confirmed by Coinbase.
< / div >
< / slide-to-accept-success >
< wallet-selector
wallet-selector-title="walletSelectorTitle"
wallet-selector-wallets="wallets"
wallet-selector-selected-wallet="wallet"
wallet-selector-show="showWallets"
wallet-selector-on-select="onWalletSelect">
< / wallet-selector >
< / ion-view >