WIP
This commit is contained in:
parent
95fa296190
commit
cd1e9bdb66
4 changed files with 57 additions and 10 deletions
|
|
@ -4,6 +4,7 @@ var _ = require('lodash')
|
|||
var async = require('async')
|
||||
|
||||
var BigNumber = require('bignumber.js')
|
||||
BigNumber.config({CRYPTO: true})
|
||||
|
||||
var logger = require('./logger')
|
||||
var notifier = require('./notifier')
|
||||
|
|
@ -715,3 +716,16 @@ exports.startCheckingNotification = function startCheckingNotification () {
|
|||
checkNotification()
|
||||
setInterval(checkNotification, CHECK_NOTIFICATION_INTERVAL)
|
||||
}
|
||||
|
||||
exports.getPhoneCode = function getPhoneCode (phone) {
|
||||
const code = BigNumber.random().toFixed(6).slice(2)
|
||||
const rec = {
|
||||
sms: {
|
||||
toNumber: phone,
|
||||
body: 'Your cryptomat code: ' + code
|
||||
}
|
||||
}
|
||||
|
||||
return smsPlugin.sendMessage(rec)
|
||||
.then(() => code)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue