Wallet/www/views/confirm.html
Gustavo Maximiliano Cortez 3b0dceccf5
Fix amount process
2017-01-16 20:07:04 -03:00

171 lines
8.5 KiB
HTML
Raw Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<ion-view id="view-confirm" hide-tabs>
<ion-nav-bar class="bar-royal">
<ion-nav-title>
{{'Confirm'|translate}}
</ion-nav-title>
<ion-nav-back-button>
</ion-nav-back-button>
</ion-nav-bar>
<ion-content ng-class="{'add-bottom-for-cta': !insufficientFunds && !noMatchingWallet}">
<div class="list">
<div class="item head">
<div class="sending-label">
<img src="img/icon-tx-sent-outline.svg">
<span translate ng-if="!useSendMax && !(isGlidera || isCoinbase)">Sending</span>
<span translate ng-if="useSendMax">Sending maximum amount</span>
<span ng-if="(isGlidera || isCoinbase) == 'buy'">Buying</span>
<span ng-if="(isGlidera || isCoinbase) == 'sell'">Selling</span>
</div>
<div class="amount-label">
<div class="amount">{{displayAmount || '...'}} <span class="unit">{{displayUnit}}</span></div>
<div class="right size-12" ng-if="cardId" ng-init="getRates()">{{exchangeRate}}</div>
<div class="alternative">{{alternativeAmountStr || '...'}}</div>
</div>
</div>
<div class="info">
<div class="item single-line" ng-if="paypro">
<span class="label" translate>Payment Expires:</span>
<span class="item-note" ng-if="!paymentExpired.value">{{remainingTimeStr.value}}</span>
<span class="item-note" ng-if="paymentExpired.value" ng-style="{'color': 'red'}" translate>Expired</span>
</div>
<div class="item">
<span class="label" ng-if="!(isGlidera || isCoinbase)" translate>To</span>
<span class="label" ng-if="(isGlidera || isCoinbase) == 'buy'">From</span>
<span class="label" ng-if="(isGlidera || isCoinbase) == 'sell'">To</span>
<span class="payment-proposal-to">
<img ng-if="!cardId && !isGiftCard && !isGlidera && !isCoinbase" src="img/icon-bitcoin-small.svg">
<img ng-if="cardId" src="img/icon-card.svg" width="34">
<i ng-if="isGiftCard" class="icon big-icon-svg">
<div class="bg icon-amazon"></div>
</i>
<img ng-if="isGlidera" src="img/glidera-logo.png" width="90"/>
<img ng-if="isCoinbase" src="img/coinbase-logo.png" width="90"/>
<div copy-to-clipboard="toAddress" ng-if="!paypro" class="ellipsis">
<contact ng-if="!toName" address="{{toAddress}}"></contact>
<span class="m15l size-14" ng-if="toName">{{toName}}</span>
</div>
<div ng-if="paypro" ng-click="openPPModal(paypro)" class="m15l size-14 w100p pointer">
<i ng-show="paypro.verified && paypro.caTrusted" class="ion-locked" style="color:green"></i>
<i ng-show="!paypro.caTrusted" class="ion-unlocked" style="color:red"></i>
<span class="ellipsis" ng-show="!toName">{{paypro.domain || paypro.toAddress}}</span>
<span ng-show="toName">{{toName}}</span>
</div>
<!-- <contact ng-if="!tx.hasMultiplesOutputs" class="ellipsis" address="{{toAddress}}"></contact>
<span ng-if="tx.hasMultiplesOutputs" translate>Multiple recipients</span> -->
</span>
</div>
<a class="item item-icon-right" ng-hide="!useSendMax && (insufficientFunds || noMatchingWallet)" ng-click="showWalletSelector()">
<span class="label" ng-if="!(isGlidera || isCoinbase)" translate>From</span>
<span class="label" ng-if="(isGlidera || isCoinbase) == 'buy'">To</span>
<span class="label" ng-if="(isGlidera || isCoinbase) == 'sell'">From</span>
<div class="wallet" ng-if="wallet">
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': wallet.color}" class="bg"/>
</i>
<div>{{wallet.name}}</div>
</div>
<div class="wallet" ng-if="!wallet">
<i class="icon big-icon-svg">
<img src="img/icon-wallet.svg" ng-style="{'background-color': 'grey'}" class="bg"/>
</i>
<div>...</div>
</div>
<i class="icon bp-arrow-right"></i>
</a>
<a class="item single-line item-icon-right" ng-if="!insufficientFunds && !noMatchingWallet && !(isGlidera || isCoinbase)" ng-click="showDescriptionPopup()">
<span class="label" translate>Add Memo</span>
<span class="item-note m10l">
{{description}}
</span>
<i class="icon bp-arrow-right"></i>
</a>
<div class="item single-line" ng-if="!insufficientFunds && !noMatchingWallet && !(isGlidera || isCoinbase)">
<span class="label">{{'Fee' | translate}}: {{feeLevel | translate}}</span>
<span class="item-note">
{{fee || '...'}}
</span>
</div>
<div class="item" ng-show="isGlidera == 'buy'">
<span class="label">Information</span>
<div class="glidera-explanation">
<div class="glidera-description" ng-show="buyPrice.qty">
Buy {{buyPrice.subtotal|currency:'':2}} {{buyPrice.currency}} in Bitcoin at {{buyPrice.price}} {{buyPrice.currency}}/BTC
</div>
<div class="glidera-description">
Fiat will be immediately withdrawn from your bank account.
</div>
<div class="glidera-description">
The bitcoins will be purchased and deposited to "{{wallet.name || '...' }}" wallet in 2-4 business days.
</div>
</div>
</div>
<div class="item" ng-show="isGlidera == 'sell'">
<span class="label">Information</span>
<div class="glidera-explanation">
<div class="glidera-description" ng-show="sellPrice.qty">
Sell {{sellPrice.subtotal|currency:'':2}} {{sellPrice.currency}} in Bitcoin at {{sellPrice.price|currency:'':2}} {{sellPrice.currency}}/BTC
</div>
<div class="glidera-description">
Fiat will be deposited in your bank account in 4-6 business days.
</div>
<div class="glidera-description">
Bitcoins will be immediately sent from your "{{wallet.name || '...' }}" wallet to Glidera.
</div>
</div>
</div>
<div class="text-center" ng-show="noMatchingWallet">
<span class="badge badge-energized" translate>No wallets available</span>
</div>
<div class="text-center" ng-show="insufficientFunds">
<span class="badge badge-energized" translate>Insufficient funds</span>
</div>
</div>
</div>
</ion-content>
<click-to-accept
ng-click="approve(statusChangeHandler)"
ng-if="!isCordova"
click-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="insufficientFunds"
no-matching-wallet="noMatchingWallet">
{{buttonText}}
</click-to-accept>
<slide-to-accept
ng-if="isCordova && (wallet && !insufficientFunds && !noMatchingWallet)"
slide-on-confirm="onConfirm()"
slide-send-status="sendStatus"
has-wallet-chosen="wallet"
insufficient-funds="insufficientFunds"
no-matching-wallet="noMatchingWallet">
{{buttonText}}
</slide-to-accept>
<slide-to-accept-success
slide-success-show="sendStatus === 'success'"
slide-success-on-confirm="onSuccessConfirm()"
slide-success-hide-on-confirm="true">
<span ng-show="wallet.m == 1 && (wallet.canSign() || wallet.isPrivKeyExternal())" translate>Payment Sent</span>
<span ng-show="wallet.m > 1 && (wallet.canSign() || wallet.isPrivKeyExternal())" translate>Proposal Created</span>
<span ng-show="!wallet.canSign() && !wallet.isPrivKeyExternal()" translate>Transaction created</span>
<div ng-show="isGlidera" class="glidera-success">
<span ng-show="isGlidera == 'buy'">A transfer has been initiated from your bank account. Your bitcoins should arrive to your wallet in 2-4 business day</span>
<span ng-show="isGlidera == 'sell'">A transfer has been initiated to your bank account. Should arrive in 4-6 business days</span>
</div>
<div ng-show="isCoinbase" class="glidera-success">
<span ng-show="isCoinbase == 'buy'">Bitcoin purchase completed. Coinbase has queued the transfer to your selected Copay wallet</span>
<span ng-show="isCoinbase == 'sell'">Sale initiated</span>
</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>