Browse Source
remove blockchain explorer dependency from email service
activeAddress
Ivan Socolsky
9 years ago
No known key found for this signature in database
GPG Key ID: FAECE6A05FAA4F56
1 changed files with
0 additions and
22 deletions
-
lib/emailservice.js
|
|
@ -14,7 +14,6 @@ var Utils = require('./common/utils'); |
|
|
|
var Storage = require('./storage'); |
|
|
|
var MessageBroker = require('./messagebroker'); |
|
|
|
var Lock = require('./lock'); |
|
|
|
var BlockchainExplorer = require('./blockchainexplorer'); |
|
|
|
|
|
|
|
var Model = require('./model'); |
|
|
|
|
|
|
@ -99,27 +98,6 @@ EmailService.prototype.start = function(opts, cb) { |
|
|
|
self.lock = opts.lock || new Lock(opts.lockOpts); |
|
|
|
done(); |
|
|
|
}, |
|
|
|
function(done) { |
|
|
|
self.explorers = _.indexBy(_.map(['livenet', 'testnet'], function(network) { |
|
|
|
var explorer; |
|
|
|
if (opts.blockchainExplorers) { |
|
|
|
explorer = opts.blockchainExplorers[network]; |
|
|
|
} else { |
|
|
|
var config = {} |
|
|
|
if (opts.blockchainExplorerOpts && opts.blockchainExplorerOpts[network]) { |
|
|
|
config = opts.blockchainExplorerOpts[network]; |
|
|
|
} |
|
|
|
var explorer = new BlockchainExplorer({ |
|
|
|
provider: config.provider, |
|
|
|
network: network, |
|
|
|
url: config.url, |
|
|
|
}); |
|
|
|
} |
|
|
|
$.checkState(explorer); |
|
|
|
return explorer; |
|
|
|
}), 'network'); |
|
|
|
done(); |
|
|
|
}, |
|
|
|
function(done) { |
|
|
|
self.mailer = opts.mailer || nodemailer.createTransport(opts.emailOpts); |
|
|
|
done(); |
|
|
|