Fixing some bugs and minor changes

This commit is contained in:
José Oliveira 2021-01-27 12:22:53 +00:00 committed by Josh Harvey
parent 7accdaa84f
commit ea1c29ebba
5 changed files with 23 additions and 15 deletions

View file

@ -29,4 +29,9 @@ function buildMarket (fiatCode, cryptoCode, serviceName) {
return cryptoCode + '/' + fiatCode
}
module.exports = { buildMarket, ALL }
function verifyFiatSupport (fiatCode, serviceName) {
const fiat = ALL[serviceName].FIAT
return fiat === 'ALL_CURRENCIES' ? true : _.includes(fiatCode, fiat)
}
module.exports = { buildMarket, ALL, verifyFiatSupport }