style(whitespace): trailing whitespaces removed
This commit is contained in:
parent
7ab3152e9c
commit
2b64f35689
6 changed files with 22 additions and 22 deletions
|
|
@ -103,7 +103,7 @@ Trader.prototype.configure = function (config) {
|
|||
};
|
||||
|
||||
// IMPORTANT: This function returns the estimated minimum available balance
|
||||
// in fiat as of the start of the current user session on the device. User
|
||||
// in fiat as of the start of the current user session on the device. User
|
||||
// session starts when a user presses then Start button and ends when we
|
||||
// send the bitcoins.
|
||||
Trader.prototype.fiatBalance = function (deviceFingerprint) {
|
||||
|
|
@ -125,7 +125,7 @@ Trader.prototype.fiatBalance = function (deviceFingerprint) {
|
|||
// `balance.transferBalance` is the balance of our transfer account (the one
|
||||
// we use to send Bitcoins to clients) in satoshis.
|
||||
var transferBalance = balance.transferBalance;
|
||||
|
||||
|
||||
// Since `transferBalance` is in satoshis, we need to turn it into
|
||||
// bitcoins and then fiat to learn how much fiat currency we can exchange.
|
||||
//
|
||||
|
|
@ -193,7 +193,7 @@ Trader.prototype.sendBitcoins = function (deviceFingerprint, tx, cb) {
|
|||
if (txRec.status === 'insufficientFunds') txErr.name = 'InsufficientFunds';
|
||||
}
|
||||
|
||||
// transaction exists, but txHash might be null,
|
||||
// transaction exists, but txHash might be null,
|
||||
// in which case ATM should continue polling
|
||||
self.pollBalance();
|
||||
cb(txErr, txRec.txHash);
|
||||
|
|
@ -213,7 +213,7 @@ Trader.prototype.trade = function (rec, deviceFingerprint) {
|
|||
delete self._sessionInfo[deviceFingerprint];
|
||||
}, SESSION_TIMEOUT)
|
||||
};
|
||||
}
|
||||
}
|
||||
this._tradeQueue.push({fiat: rec.fiat, satoshis: rec.satoshis, currency: rec.currency});
|
||||
};
|
||||
|
||||
|
|
@ -291,7 +291,7 @@ Trader.prototype._tradeForexMultiplier = function _tradeForexMultiplier() {
|
|||
Trader.prototype._tradeBalanceFunc = function _tradeBalanceFunc(callback) {
|
||||
if (!this.tradeExchange) return callback(null, null);
|
||||
var forexMultiplier = this._tradeForexMultiplier();
|
||||
if (!forexMultiplier) return callback(new Error('Can\'t compute balance, no tickers yet.'));
|
||||
if (!forexMultiplier) return callback(new Error('Can\'t compute balance, no tickers yet.'));
|
||||
this.tradeExchange.balance(function (err, localBalance) {
|
||||
if (err) return callback(err);
|
||||
callback(null, localBalance * forexMultiplier);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue