Fixed bitstamp coin scaling (#167)
The coin scaling for the bistamp excahnge was using a satoshi scaling for ETH when it should have been using wei.
This commit is contained in:
parent
38aa006ecc
commit
de4a675a43
4 changed files with 13 additions and 14 deletions
|
|
@ -1,5 +1,3 @@
|
|||
const coinUtils = require('../../coin-utils')
|
||||
|
||||
const PAIRS = {
|
||||
BTC: {
|
||||
USD: 'XXBTZUSD',
|
||||
|
|
@ -27,10 +25,4 @@ const PAIRS = {
|
|||
}
|
||||
}
|
||||
|
||||
module.exports = {PAIRS, toUnit}
|
||||
|
||||
function toUnit (cryptoAtoms, cryptoCode) {
|
||||
const cryptoRec = coinUtils.getCryptoCurrency(cryptoCode)
|
||||
const unitScale = cryptoRec.unitScale
|
||||
return cryptoAtoms.shift(-unitScale)
|
||||
}
|
||||
module.exports = {PAIRS}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue