Trade on EUR Bitstamp if fiat other than USD/EUR (#102)
* Trade on EUR Bitstamp if fiat other than USD/EUR * Don't mutate fiatCode
This commit is contained in:
parent
a2d168644f
commit
a8d6cddba9
1 changed files with 3 additions and 1 deletions
|
|
@ -22,7 +22,9 @@ function handleErrors (data) {
|
|||
throw err
|
||||
}
|
||||
|
||||
function trade (type, account, cryptoAtoms, fiatCode, cryptoCode) {
|
||||
function trade (type, account, cryptoAtoms, _fiatCode, cryptoCode) {
|
||||
const fiatCode = _fiatCode === 'USD' ? 'USD' : 'EUR'
|
||||
|
||||
try {
|
||||
const market = common.buildMarket(fiatCode, cryptoCode)
|
||||
const options = {amount: cryptoAtoms.shift(-SATOSHI_SHIFT).toFixed(8)}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue