From 4febe719b063c21a144114f3752818e41ad791f1 Mon Sep 17 00:00:00 2001 From: Gustavo Maximiliano Cortez Date: Thu, 22 Dec 2016 20:37:10 -0300 Subject: [PATCH] Selling process --- src/js/controllers/amount.js | 19 ++- src/js/controllers/coinbase.js | 4 +- src/js/controllers/confirm.js | 177 ++++++++++++++++++----- src/js/routes.js | 2 +- src/js/services/coinbaseService.js | 223 ++--------------------------- www/views/amount.html | 2 +- www/views/confirm.html | 46 +++++- 7 files changed, 216 insertions(+), 257 deletions(-) diff --git a/src/js/controllers/amount.js b/src/js/controllers/amount.js index 55da74976..7247d3cb7 100644 --- a/src/js/controllers/amount.js +++ b/src/js/controllers/amount.js @@ -51,15 +51,23 @@ angular.module('copayApp.controllers').controller('amountController', function($ } if ($scope.isCoinbase) { - var currency = 'USD'; + var currency = 'USD'; + coinbaseService.init(function(err, data) { if ($scope.isCoinbase == 'buy') { coinbaseService.buyPrice(data.accessToken, currency, function(err, b) { $scope.coinbaseBuyPrice = b.data || null; }); } else { - coinbaseService.sellPrice(data.accessToken, currency, function(err, b) { - $scope.coinbaseSellPrice = b.data || null; + coinbaseService.sellPrice(data.accessToken, currency, function(err, s) { + $scope.coinbaseSellPrice = s.data || null; + }); + + var dataSrc = { + name: 'Received from ' + $window.appConfig.nameCase + }; + coinbaseService.createAddress(data.accessToken, data.accountId, dataSrc, function(err, data) { + $scope.toAddress = data.data.address; }); } @@ -394,10 +402,15 @@ angular.module('copayApp.controllers').controller('amountController', function($ popupService.showAlert(gettextCatalog.getString('Error'), 'No Payment Method Selected'); return; } + if ($scope.isCoinbase == 'sell' && lodash.isEmpty($scope.toAddress)) { + popupService.showAlert(gettextCatalog.getString('Error'), 'No Destination Address'); + return; + } var amountUSD = $scope.showAlternativeAmount ? _amount : $filter('formatFiatAmount')(toFiat(_amount)); var amount = $scope.showAlternativeAmount ? fromFiat(_amount) : _amount; $state.transitionTo('tabs.buyandsell.coinbase.confirm', { toAmount: (amount * unitToSatoshi).toFixed(0), + toAddress: $scope.toAddress, isCoinbase: $scope.isCoinbase, coinbasePaymentMethodId: $scope.coinbaseSelectedPaymentMethod.id, coinbaseAmount: amountUSD, diff --git a/src/js/controllers/coinbase.js b/src/js/controllers/coinbase.js index 333ab1ee6..c23bd3faf 100644 --- a/src/js/controllers/coinbase.js +++ b/src/js/controllers/coinbase.js @@ -7,7 +7,6 @@ angular.module('copayApp.controllers').controller('coinbaseController', function var init = function() { ongoingProcess.set('connectingCoinbase', true); coinbaseService.init(function(err, data) { -console.log('[coinbase.js:9]',err, data); //TODO) ongoingProcess.set('connectingCoinbase', false); if (err || lodash.isEmpty(data)) { if (err) { @@ -26,9 +25,8 @@ console.log('[coinbase.js:9]',err, data); //TODO) }; $scope.updateTransactions = function() { - $log.debug('Checking for transactions...'); + $log.debug('Getting transactions...'); coinbaseService.getPendingTransactions($scope.accessToken, $scope.accountId, function(err, txs) { -console.log('[coinbase.js:43]',txs); //TODO $scope.pendingTransactions = txs; }); diff --git a/src/js/controllers/confirm.js b/src/js/controllers/confirm.js index 9cc0e8ec1..a8a9e5a77 100644 --- a/src/js/controllers/confirm.js +++ b/src/js/controllers/confirm.js @@ -186,6 +186,19 @@ angular.module('copayApp.controllers').controller('confirmController', function( if ($scope.isCoinbase == 'buy') { coinbaseBuyRequest($scope.coinbaseAmount, $scope.coinbaseAmountCurrency, $scope.coinbasePaymentMethodId); } + + if ($scope.isCoinbase == 'sell') { + var satToBtc = 1 / 100000000; + $scope.coinbaseAmountBTC = (toAmount * satToBtc).toFixed(8); + $scope.priceSensitivity = coinbaseService.priceSensitivity; + $scope.selectedPriceSensitivity = { data: coinbaseService.selectedPriceSensitivity }; + + coinbaseService.init(function(err, data) { + coinbaseService.sellPrice(data.accessToken, $scope.coinbaseAmountCurrency, function(err, sell) { + $scope.coinbaseSellPrice = sell.data; + }); + }); + } }; function resetValues() { @@ -373,7 +386,7 @@ angular.module('copayApp.controllers').controller('confirmController', function( $scope.wallet = wallet; $scope.fee = $scope.txp = null; - if ($scope.isGlidera || $scope.isCoinbase) return; + if ($scope.isGlidera || $scope.isCoinbase == 'buy') return; if (stop) { $timeout.cancel(stop); stop = null; @@ -542,45 +555,123 @@ angular.module('copayApp.controllers').controller('confirmController', function( if ($scope.isCoinbase) { - ongoingProcess.set('buyingBitcoin', true, onSendStatusChange); - coinbaseService.init(function(err, res) { - if (err) { - $log.error(err); - return; - } - var token = res.accessToken; - var accountId = res.accountId; - coinbaseService.buyCommit(token, accountId, $scope.coinbaseBuyRequest.id, function(err, b) { -console.log('[confirm.js:508] BUY COMMIT',b); //TODO + // BUY + if ($scope.isCoinbase == 'buy') { + ongoingProcess.set('buyingBitcoin', true, onSendStatusChange); + coinbaseService.init(function(err, res) { if (err) { $log.error(err); return; } - var tx = b.data.transaction; - if (!tx) return; + var token = res.accessToken; + var accountId = res.accountId; + coinbaseService.buyCommit(token, accountId, $scope.coinbaseBuyRequest.id, function(err, b) { + if (err) { + $log.error(err); + return; + } + var tx = b.data.transaction; + if (!tx) return; - coinbaseService.getTransaction(token, accountId, tx.id, function(err, updatedTx) { -console.log('[confirm.js:517] GET TRANSACTION',updatedTx); //TODO - if (err) $log.debug(err); - walletService.getAddress($scope.wallet, false, function(err, walletAddr) { -console.log('[confirm.js:521] GET ADDRESS',walletAddr); //TODO - if (err) { - return; - } - updatedTx.data['toAddr'] = walletAddr; - coinbaseService.savePendingTransaction(updatedTx.data, {}, function(err) { - if (err) $log.debug(err); - if (updatedTx.data.status == 'completed') { - coinbaseSendToCopay(token, accountId, updatedTx.data, onSendStatusChange); - } else { - ongoingProcess.set('buyingBitcoin', false, onSendStatusChange); - $scope.coinbaseBuySuccess = updatedTx.data; + coinbaseService.getTransaction(token, accountId, tx.id, function(err, updatedTx) { + if (err) $log.debug(err); + walletService.getAddress($scope.wallet, false, function(err, walletAddr) { + if (err) { + return; } + updatedTx.data['toAddr'] = walletAddr; + coinbaseService.savePendingTransaction(updatedTx.data, {}, function(err) { + if (err) $log.debug(err); + if (updatedTx.data.status == 'completed') { + coinbaseSendToCopay(token, accountId, updatedTx.data, onSendStatusChange); + } else { + ongoingProcess.set('buyingBitcoin', false, onSendStatusChange); + $scope.coinbaseBuySuccess = updatedTx.data; + } + }); }); }); }); }); - }); + } + + + // SELL + if ($scope.isCoinbase == 'sell') { + + ongoingProcess.set('sellingBitcoin', true, onSendStatusChange); + createTx($scope.wallet, false, function(err, txp) { + var message = gettextCatalog.getString('Selling {{amountStr}} from {{name}}', { + amountStr: $scope.coinbaseAmount + ' ' + $scope.coinbaseAmountCurrency, + name: $scope.wallet.name + }); + var okText = gettextCatalog.getString('Confirm'); + var cancelText = gettextCatalog.getString('Cancel'); + + popupService.showConfirm(null, message, okText, cancelText, function(ok) { + if (!ok) { + $scope.sendStatus = ''; + $timeout(function() { + $scope.$apply(); + }); + return; + } + // SIMULATE publishAndSign + //$log.warn('Simulating publishAndSign...'); + publishAndSign(wallet, txp, onSendStatusChange); + + $timeout(function() { + + coinbaseService.init(function(err, res) { + if (err) { + $log.error(err); + return; + } + var token = res.accessToken; + var accountId = res.accountId; + + coinbaseService.getAddressTransactions(token, accountId, $scope.toAddress, function(err, ctxs) { + if (err) { + ongoingProcess.clear(); + $log.debug(err); + return; + } + var coinbaseTransactions = ctxs.data; + var txFound = false; + var ctx; + for(var i = 0; i < coinbaseTransactions.length; i++) { + ctx = coinbaseTransactions[i]; + if (ctx.type == 'send' && ctx.from) { + txFound = true; + if (ctx.status == 'completed') { + coinbaseSellRequest(token, accountId, ctx, onSendStatusChange); + } else { + $log.debug('Saving transaction to process later'); + ctx['price_sensitivity'] = $scope.selectedPriceSensitivity.data; + ctx['sell_price_amount'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.amount : ''; + ctx['sell_price_currency'] = $scope.coinbaseSellPrice ? $scope.coinbaseSellPrice.currency : 'USD'; + ctx['description'] = $window.appConfig.nameCase + ' Wallet: ' + $scope.wallet.name; + $scope.coinbaseSendInfo = ctx; + coinbaseService.savePendingTransaction(ctx, null, function(err) { + ongoingProcess.set('sellingBitcoin', false, onSendStatusChange); + if (err) $log.debug(err); + }); + } + } + } + if (!txFound) { + // Transaction sent, but can not verify it on Coinbase.com + // TODO: improve error message + ongoingProcess.clear(); + return setSendError('Transaction not found. Please, verify if transaction exists on Coinbase.com'); + } + }); + }); + }, 5000); + }); + }); + } + return; } @@ -635,7 +726,8 @@ console.log('[confirm.js:521] GET ADDRESS',walletAddr); //TODO processName === 'broadcastingTx' || ((processName === 'signingTx') && $scope.wallet.m > 1) || (processName == 'sendingTx' && !$scope.wallet.canSign() && !$scope.wallet.isPrivKeyExternal()) || - (processName == 'buyingBitcoin') + (processName == 'buyingBitcoin') || + (processName == 'sellingBitcoin' && ($scope.coinbaseSellRequest || $scope.coinbaseSendInfo)) ) && !isOn) { $scope.sendStatus = 'success'; $timeout(function() { @@ -979,7 +1071,6 @@ console.log('[confirm.js:521] GET ADDRESS',walletAddr); //TODO return; } coinbaseService.buyRequest(res.accessToken, res.accountId, dataSrc, function(err, data) { -console.log('[confirm.js:931] BUY REQUEST',data); //TODO if (err) { $log.error(err); return; @@ -989,6 +1080,25 @@ console.log('[confirm.js:931] BUY REQUEST',data); //TODO }); }; + var coinbaseSellRequest = function(accessToken, accountId, ctx, onSendStatusChange) { + var dataSrc = ctx.amount; + dataSrc['payment_method'] = $scope.coinbasePaymentMethodId || null; + dataSrc['commit'] = true; + + coinbaseService.sellRequest(accessToken, accountId, dataSrc, function(err, data) { + if (err) { + ongoingProcess.clear(); + $log.error(err); + return; + } + $scope.coinbaseSellRequest = data.data; + coinbaseService.savePendingTransaction($scope.coinbaseSellRequest, null, function(err) { + ongoingProcess.set('sellingBitcoin', false, onSendStatusChange); + if (err) $log.debug(err); + }); + }); + }; + var coinbaseSendToCopay = function(token, accountId, tx, onSendStatusChange) { var data = { to: tx.toAddr, @@ -997,20 +1107,17 @@ console.log('[confirm.js:931] BUY REQUEST',data); //TODO description: 'Copay Wallet: ' + $scope.wallet.name }; coinbaseService.sendTo(token, accountId, data, function(err, res) { -console.log('[confirm.js:938] SEND TO',res); //TODO if (err) { return; } $scope.coinbaseReceiveInfo = res.data; if (!res.data.id) return; coinbaseService.getTransaction(token, accountId, res.data.id, function(err, sendTx) { -console.log('[confirm.js:945] GET TRANSACTION',sendTx); //TODO coinbaseService.savePendingTransaction(tx, { remove: true }, function(err) { coinbaseService.savePendingTransaction(sendTx.data, {}, function(err) { ongoingProcess.set('buyingBitcoin', false, onSendStatusChange); -console.log('[confirm.js:948] LISTO',err); //TODO // TODO }); }); diff --git a/src/js/routes.js b/src/js/routes.js index ad0bcca17..57d5b57d8 100644 --- a/src/js/routes.js +++ b/src/js/routes.js @@ -955,7 +955,7 @@ angular.module('copayApp').config(function(historicLogProvider, $provide, $logPr } }) .state('tabs.buyandsell.coinbase.confirm', { - url: '/confirm/:toAmount/:isCoinbase/:coinbasePaymentMethodId/:coinbaseAmount/:coinbaseAmountCurrency', + url: '/confirm/:toAmount/:toAddress/:isCoinbase/:coinbasePaymentMethodId/:coinbaseAmount/:coinbaseAmountCurrency', views: { 'tab-home@tabs': { controller: 'confirmController', diff --git a/src/js/services/coinbaseService.js b/src/js/services/coinbaseService.js index 6bccb318d..248dc0e52 100644 --- a/src/js/services/coinbaseService.js +++ b/src/js/services/coinbaseService.js @@ -6,9 +6,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ var isCordova = platformInfo.isCordova; var isNW = platformInfo.isNW; - // FAKE DATA - var isFake = true; - root.priceSensitivity = [ { value: 0.5, @@ -271,7 +268,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }; root.getTransaction = function(token, accountId, transactionId, cb) { - if (isFake) return cb(null, get_transaction); if (!token) return cb('Invalid Token'); $http(_get('/accounts/' + accountId + '/transactions/' + transactionId, token)).then(function(data) { $log.info('Coinbase Transaction: SUCCESS'); @@ -282,6 +278,17 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }); }; + root.getAddressTransactions = function(token, accountId, addressId, cb) { + if (!token) return cb('Invalid Token'); + $http(_get('/accounts/' + accountId + '/addresses/' + addressId + '/transactions', token)).then(function(data) { + $log.info('Coinbase Address s Transactions: SUCCESS'); + return cb(null, data.data); + }, function(data) { + $log.error('Coinbase Address s Transactions: ERROR ' + data.statusText); + return cb(data.data); + }); + }; + root.getTransactions = function(token, accountId, cb) { if (!token) return cb('Invalid Token'); $http(_get('/accounts/' + accountId + '/transactions', token)).then(function(data) { @@ -325,7 +332,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }; root.getPaymentMethods = function(token, cb) { - if (isFake) return cb(null, payment_methods); $http(_get('/payment-methods', token)).then(function(data) { $log.info('Coinbase Get Payment Methods: SUCCESS'); return cb(null, data.data); @@ -385,7 +391,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }; root.buyRequest = function(token, accountId, data, cb) { - if (isFake) return cb(null, buy_request); var data = { amount: data.amount, currency: data.currency, @@ -402,7 +407,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }; root.buyCommit = function(token, accountId, buyId, cb) { - if (isFake) return cb(null, buy_commit); $http(_post('/accounts/' + accountId + '/buys/' + buyId + '/commit', token)).then(function(data) { $log.info('Coinbase Buy Commit: SUCCESS'); return cb(null, data.data); @@ -426,7 +430,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }; root.sendTo = function(token, accountId, data, cb) { - if (isFake) return cb(null, send_to_copay); var data = { type: 'send', to: data.to, @@ -485,7 +488,7 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ (dataFromStorage.type == 'send' && dataFromStorage.status == 'completed')) return cb(null, coinbasePendingTransactions); root.getTransaction(accessToken, accountId, txId, function(err, tx) { - if (err) { + if (err || lodash.isEmpty(tx)) { _savePendingTransaction(dataFromStorage, { status: 'error', error: err @@ -633,208 +636,6 @@ angular.module('copayApp.services').factory('coinbaseService', function($http, $ }); }; - var buy_request = { - "data" : { - "id": "a333743d-184a-5b5b-abe8-11612fc44ab5", - "status": "created", - "payment_method": { - "id": "83562370-3e5c-51db-87da-752af5ab9559", - "resource": "payment_method", - "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559" - }, - "transaction": { - "id": "763d1401-fd17-5a18-852a-9cca5ac2f9c0", - "resource": "transaction", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/transactions/441b9494-b3f0-5b98-b9b0-4d82c21c252a" - }, - "amount": { - "amount": "10.00000000", - "currency": "BTC" - }, - "total": { - "amount": "102.01", - "currency": "USD" - }, - "subtotal": { - "amount": "101.00", - "currency": "USD" - }, - "created_at": "2015-04-01T18:43:37-07:00", - "updated_at": "2015-04-01T18:43:37-07:00", - "resource": "buy", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/buys/a333743d-184a-5b5b-abe8-11612fc44ab5", - "committed": false, - "instant": false, - "fee": { - "amount": "1.01", - "currency": "USD" - }, - "payout_at": "2015-04-07T18:43:37-07:00" - } - }; - - var payment_methods = { - "pagination": { - "ending_before": null, - "starting_after": null, - "limit": 25, - "order": "desc", - "previous_uri": null, - "next_uri": null - }, - "data": [ - { - "id": "127b4d76-a1a0-5de7-8185-3657d7b526ec", - "type": "fiat_account", - "name": "USD Wallet", - "currency": "USD", - "primary_buy": false, - "primary_sell": false, - "allow_buy": true, - "allow_sell": true, - "allow_deposit": true, - "allow_withdraw": true, - "instant_buy": true, - "instant_sell": true, - "created_at": "2015-02-24T14:30:30-08:00", - "updated_at": "2015-02-24T14:30:30-08:00", - "resource": "payment_method", - "resource_path": "/v2/payment-methods/127b4d76-a1a0-5de7-8185-3657d7b526ec", - "fiat_account": { - "id": "a077fff9-312b-559b-af98-146c33e27388", - "resource": "account", - "resource_path": "/v2/accounts/a077fff9-312b-559b-af98-146c33e27388" - } - }, - { - "id": "83562370-3e5c-51db-87da-752af5ab9559", - "type": "ach_bank_account", - "name": "International Bank *****1111", - "currency": "USD", - "primary_buy": true, - "primary_sell": true, - "allow_buy": true, - "allow_sell": true, - "allow_deposit": true, - "allow_withdraw": true, - "instant_buy": false, - "instant_sell": false, - "created_at": "2015-01-31T20:49:02Z", - "updated_at": "2015-02-11T16:53:57-08:00", - "resource": "payment_method", - "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559" - } - ] - }; - - var get_transaction = { - "data" : { - "id": "57ffb4ae-0c59-5430-bcd3-3f98f797a66c", - "type": "send", - "status": "completed", - "amount": { - "amount": "-0.00100000", - "currency": "BTC" - }, - "native_amount": { - "amount": "-0.01", - "currency": "USD" - }, - "description": null, - "created_at": "2015-03-11T13:13:35-07:00", - "updated_at": "2015-03-26T15:55:43-07:00", - "resource": "transaction", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/transactions/57ffb4ae-0c59-5430-bcd3-3f98f797a66c", - "network": { - "status": "off_blockchain", - "name": "bitcoin" - }, - "to": { - "id": "a6b4c2df-a62c-5d68-822a-dd4e2102e703", - "resource": "user", - "resource_path": "/v2/users/a6b4c2df-a62c-5d68-822a-dd4e2102e703" - }, - "details": { - "title": "Send bitcoin", - "subtitle": "to User 2" - } - } - }; - - var buy_commit = { - "data" : { - "id": "a333743d-184a-5b5b-abe8-11612fc44ab5", - "status": "created", - "payment_method": { - "id": "83562370-3e5c-51db-87da-752af5ab9559", - "resource": "payment_method", - "resource_path": "/v2/payment-methods/83562370-3e5c-51db-87da-752af5ab9559" - }, - "transaction": { - "id": "763d1401-fd17-5a18-852a-9cca5ac2f9c0", - "resource": "transaction", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/transactions/441b9494-b3f0-5b98-b9b0-4d82c21c252a" - }, - "amount": { - "amount": "10.00000000", - "currency": "BTC" - }, - "total": { - "amount": "102.01", - "currency": "USD" - }, - "subtotal": { - "amount": "101.00", - "currency": "USD" - }, - "created_at": "2015-04-01T18:43:37-07:00", - "updated_at": "2015-04-01T18:43:37-07:00", - "resource": "buy", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/buys/a333743d-184a-5b5b-abe8-11612fc44ab5", - "committed": true, - "instant": false, - "fee": { - "amount": "1.01", - "currency": "USD" - }, - "payout_at": "2015-04-07T18:43:37-07:00" - } - }; - - var send_to_copay = { - "data" : { - "id": "3c04e35e-8e5a-5ff1-9155-00675db4ac02", - "type": "send", - "status": "pending", - "amount": { - "amount": "-0.10000000", - "currency": "BTC" - }, - "native_amount": { - "amount": "-1.00", - "currency": "USD" - }, - "description": null, - "created_at": "2015-01-31T20:49:02Z", - "updated_at": "2015-03-31T17:25:29-07:00", - "resource": "transaction", - "resource_path": "/v2/accounts/2bbf394c-193b-5b2a-9155-3b4732659ede/transactions/3c04e35e-8e5a-5ff1-9155-00675db4ac02", - "network": { - "status": "unconfirmed", - "hash": "463397c87beddd9a61ade61359a13adc9efea26062191fe07147037bce7f33ed", - "name": "bitcoin" - }, - "to": { - "resource": "bitcoin_address", - "address": "1AUJ8z5RuHRTqD1eikyfUUetzGmdWLGkpT" - }, - "details": { - "title": "Send bitcoin", - "subtitle": "to User 2" - } - } - }; - return root; }); diff --git a/www/views/amount.html b/www/views/amount.html index c5366bdc4..867258a99 100644 --- a/www/views/amount.html +++ b/www/views/amount.html @@ -84,7 +84,7 @@
1 BTC ~ {{coinbaseSellPrice.amount}} {{coinbaseSellPrice.currency}} -
+ diff --git a/www/views/confirm.html b/www/views/confirm.html index 4cf9e823f..c2c2a9471 100644 --- a/www/views/confirm.html +++ b/www/views/confirm.html @@ -29,6 +29,37 @@ {{remainingTimeStr.value}} Expired + +
+ At what percentage lower price would you accept to sell? +
+ +
+
+ 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). +
+
+
+ Estimated sale value: + + {{coinbaseSellPrice.amount * coinbaseAmountBTC | currency : 'USD ' : 2}} + +
+ Still sell if price fall until: + + {{(coinbaseSellPrice.amount - (selectedPriceSensitivity.data.value / 100) * + coinbaseSellPrice.amount) * coinbaseAmountBTC | currency : 'USD ' : 2}} + +
+
To From @@ -75,14 +106,14 @@
- + Add Memo {{description}} -
+
{{'Fee' | translate}}: {{feeLevel | translate}} {{fee || '...'}} @@ -159,6 +190,8 @@ slide-success-on-confirm="onSuccessConfirm()" slide-success-hide-on-confirm="true"> Bought + Funds sent to Coinbase Account + Sale initiated
Payment Sent Proposal Created @@ -177,7 +210,14 @@ Buy confirmed. Funds will be send soon to your selected wallet - Sale initiated + + + The transaction is not yet confirmed, and will show as "Processing" in your Activity. The bitcoin sale will be completed automatically once it is confirmed by Coinbase. + + + A transfer has been initiated to your bank account and should arrive at {{coinbaseSellRequest.payout_at | amCalendar}}. + +