cash-in working
This commit is contained in:
parent
f357b6080e
commit
e2d619c56d
3 changed files with 6 additions and 5 deletions
|
|
@ -251,7 +251,7 @@ function _sendCoins (toAddress, cryptoAtoms, cryptoCode, cb) {
|
||||||
var walletPlugin = walletPlugins[cryptoCode]
|
var walletPlugin = walletPlugins[cryptoCode]
|
||||||
var transactionFee = cachedConfig.exchanges.settings.transactionFee
|
var transactionFee = cachedConfig.exchanges.settings.transactionFee
|
||||||
if (cryptoCode === 'BTC') {
|
if (cryptoCode === 'BTC') {
|
||||||
walletPlugin.sendBitcoins(toAddress, cryptoAtoms, transactionFee, cb)
|
walletPlugin.sendBitcoins(toAddress, cryptoAtoms.truncated().toNumber(), transactionFee, cb)
|
||||||
} else {
|
} else {
|
||||||
walletPlugin.sendBitcoins(toAddress, cryptoAtoms, cryptoCode, transactionFee, cb)
|
walletPlugin.sendBitcoins(toAddress, cryptoAtoms, cryptoCode, transactionFee, cb)
|
||||||
}
|
}
|
||||||
|
|
@ -301,7 +301,7 @@ function reapTx (row) {
|
||||||
var session = {fingerprint: row.device_fingerprint, id: row.session_id}
|
var session = {fingerprint: row.device_fingerprint, id: row.session_id}
|
||||||
var tx = {
|
var tx = {
|
||||||
fiat: 0,
|
fiat: 0,
|
||||||
satoshis: row.satoshis,
|
satoshis: new BigNumber(row.satoshis),
|
||||||
toAddress: row.to_address,
|
toAddress: row.to_address,
|
||||||
currencyCode: row.currency_code,
|
currencyCode: row.currency_code,
|
||||||
cryptoCode: row.crypto_code,
|
cryptoCode: row.crypto_code,
|
||||||
|
|
|
||||||
|
|
@ -296,7 +296,7 @@ function insertTx (client, session, incoming, tx, satoshis, fiat, stage,
|
||||||
incoming,
|
incoming,
|
||||||
session.fingerprint,
|
session.fingerprint,
|
||||||
tx.toAddress,
|
tx.toAddress,
|
||||||
satoshis,
|
satoshis.toString(),
|
||||||
tx.currencyCode,
|
tx.currencyCode,
|
||||||
tx.cryptoCode,
|
tx.cryptoCode,
|
||||||
fiat,
|
fiat,
|
||||||
|
|
|
||||||
|
|
@ -115,6 +115,7 @@ function trade (req, res) {
|
||||||
function send (req, res) {
|
function send (req, res) {
|
||||||
var tx = req.body
|
var tx = req.body
|
||||||
tx.cryptoAtoms = new BigNumber(tx.cryptoAtoms)
|
tx.cryptoAtoms = new BigNumber(tx.cryptoAtoms)
|
||||||
|
tx.satoshis = tx.cryptoAtoms
|
||||||
|
|
||||||
plugins.sendCoins(session(req), tx, function (err, status) {
|
plugins.sendCoins(session(req), tx, function (err, status) {
|
||||||
// TODO: use status.statusCode here after confirming machine compatibility
|
// TODO: use status.statusCode here after confirming machine compatibility
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue