Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Commit

Permalink
chore(SFOX): show pending buy amts
Browse files Browse the repository at this point in the history
  • Loading branch information
plondon committed Apr 19, 2018
1 parent e9645bf commit 6263541
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/partials/sfox/checkout.pug
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ bc-tabs(tab="tabs.selectedTab" tab-options="tabs.options" on-select="tabs.select
span
i.pointer.ti-close.f-14.mid-grey(ng-click="checkout.dismissBuyIntro()")
p.f-12.mt-10(translate="SFOX.buy.INTRODUCING_BODY")
.width-50.pl-30.prn.pv-10-mobile.no-margin-mobile(ng-if="pendingBuyTrades().length")
span You have {{ pendingBuyTrades().length }} pending buy {{ pendingBuyTrades().length === 1 ? 'transaction' : 'transactions' }} for a total of {{ pendingBuyTradesTotal() }} BTC. You can see more details in your
|  
a(ng-click="tabs.select('ORDER_HISTORY')") Order History.
.flex-row.pbvl(ng-show="tabs.selectedTab === 'SELL_BITCOIN' && checkout.onStep('create')")
.border-desktop.ph-30.pv-30.width-50.no-padding-mobile(ng-controller="SfoxSellCheckoutController")
exchange-checkout(
Expand Down
2 changes: 2 additions & 0 deletions assets/js/controllers/sfox/sfoxCheckout.controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ function SfoxCheckoutController ($scope, $timeout, $stateParams, $q, Wallet, MyW
let buyLinks = env.partners.sfox.buySurveyLinks;

$scope.showBuy = () => MyWallet.wallet.accountInfo.invited.sfoxBuy;
$scope.pendingBuyTrades = () => $scope.pendingTrades().filter((t) => t.isBuy);
$scope.pendingBuyTradesTotal = () => $scope.pendingBuyTrades().map((t) => t.receiveAmount).reduce((acc, amt) => acc + amt);

this.handleCancel = (skipConfirm, type, step) => {
if (skipConfirm) $scope.checkout.goTo('create');
Expand Down

0 comments on commit 6263541

Please sign in to comment.