Refactored sendFlowService and cleared its state before entering the send tab.

This commit is contained in:
Brendon Duncan 2018-08-09 11:10:26 +12:00
commit dff0d51ef3
11 changed files with 125 additions and 49 deletions

View file

@ -4,6 +4,25 @@
</ion-nav-bar>
<ion-content>
<div id="tab-send-header" ng-if="hasFunds">
<div class="content-frame" ng-if="fromWallet">
<div class="card card-gutter-compact">
<div class="item item-compact" translate>From:</div>
<div class="item item-gutterless item-complex item-avatar">
<div class="item-content item-content-avatar">
<i class="icon big-icon-svg theme-circle theme-circle-services">
<div class="bg icon-wallet"
style="background-color: {{fromWallet.color}}"
></div>
</i>
<h2>{{fromWallet.name}}</h2>
<!--<p ng-show="vm.origin.balanceAmount">{{vm.origin.balanceAmount}} {{vm.origin.balanceCurrency}}</p>-->
<formatted-amount value="{{fromWallet.status.totalBalanceStr ? fromWallet.status.totalBalanceStr : ( fromWallet.cachedBalance ? fromWallet.cachedBalance + (fromWallet.cachedBalanceUpdatedOn ? ' &middot; ' + ( fromWallet.cachedBalanceUpdatedOn * 1000 | amTimeAgo) : '') : '' ) }}"></formatted-amount>
</div>
</div>
</div>
</div>
<div class="send-wrapper item">
<div class="row">
<div class="input" ng-class="{'focus': searchFocus}">
@ -22,7 +41,7 @@
</button>
</div>
<div class="col-60">
<button class="button button-standard button-primary button-outline" ui-sref="tabs.send.wallet-to-wallet">
<button class="button button-standard button-primary button-outline" ng-click="startWalletToWalletTransfer()">
<img src="img/icon-w2w.svg"/><br/>
<span translate>Wallet to Wallet Transfer</span>
</button>