Wallet/www/views/buyCoinbase.html
Gustavo Maximiliano Cortez a5303396c1
Refactor buying bitcoin
2017-01-16 20:09:00 -03:00

103 lines
3.2 KiB
HTML

<ion-view id="coinbase" hide-tabs>
<ion-nav-bar class="bar-royal">
<ion-nav-back-button>
</ion-nav-back-button>
<ion-nav-title>Buy bitcoin</ion-nav-title>
</ion-nav-bar>
<ion-content class="add-bottom-for-cta">
<!-- BUY -->
<div class="list">
<div class="item item-divider">
Purchase Info
</div>
<label class="item item-input item-select">
<div class="input-label">
Payment Method
</div>
<select ng-model="selectedPaymentMethodId.value"
ng-options="item.id as item.name for item in paymentMethods"
ng-change="buyRequest()">
</select>
</label>
<div ng-if="buyRequestInfo">
<div class="item">
Amount
<span class="item-note">
{{buyRequestInfo.amount.amount}} {{buyRequestInfo.amount.currency}}
</span>
</div>
<div class="item" ng-click="showWalletSelector()">
<span>Receive in</span>
<span class="item-note">{{wallet ? wallet.name : '...'}}</span>
</div>
<div class="item item-divider">
Fees
</div>
<div class="item" ng-repeat="fee in buyRequestInfo.fees">
{{fee.type}}
<span class="item-note">
{{fee.amount.amount}} {{fee.amount.currency}}
</span>
</div>
<div class="item item-divider">
Total
</div>
<div class="item">
Subtotal
<span class="item-note">
{{buyRequestInfo.subtotal.amount}} {{buyRequestInfo.subtotal.currency}}
</span>
</div>
<div class="item">
Total
<span class="item-note">
{{buyRequestInfo.total.amount}} {{buyRequestInfo.total.currency}}
</span>
</div>
</div>
</div>
</ion-content>
<click-to-accept
ng-disabled="!selectedPaymentMethodId.value || !buyRequestInfo || !wallet"
ng-click="buyConfirm()"
ng-if="!isCordova && buyRequestInfo"
click-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="!selectedPaymentMethodId.value"
no-matching-wallet="!buyRequestInfo">
Confirm purchase
</click-to-accept>
<slide-to-accept
ng-disabled="!selectedPaymentMethodId.value || !buyRequestInfo || !wallet"
ng-if="isCordova && buyRequestInfo"
slide-on-confirm="buyConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="!selectedPaymentMethodId.value"
no-matching-wallet="!buyRequestInfo">
Slide to buy
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="goBackHome()"
slide-success-hide-on-confirm="true">
<span>Bought</span>
<div class="m10 size-14">
Bitcoin purchase completed. Coinbase has queued the transfer to your selected wallet
</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>