lamassu-server/lib/plugins/zero-conf/mock-zero-conf/mock-zero-conf.js
2017-06-01 16:52:59 +01:00

11 lines
312 B
JavaScript

module.exports = {authorize}
function authorize (account, toAddress, cryptoAtoms, cryptoCode) {
return Promise.resolve()
.then(() => {
if (cryptoCode !== 'BTC') throw new Error('Unsupported crypto: ' + cryptoCode)
const authorizedValue = 1e5 * 10
return cryptoAtoms.lte(authorizedValue)
})
}