Skip to content

Commit

Permalink
#65 Fix create wallet command builder
Browse files Browse the repository at this point in the history
  • Loading branch information
andreafspeziale committed Mar 8, 2019
1 parent 6bbc9d0 commit fc3709e
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
@@ -1,22 +1,21 @@
const logger = require('../../../logger')
const CreateWalletCommand = require('../../../commands/trading-wallet/CreateWalletCommand')
const CreateWalletCommandValidator = require('../../../validators/commands/trading-wallet/CreateWalletCommandValidator')
const GetAllowanceCommandValidator = require('../../../validators/commands/token/GetAllowanceCommandValidator')
const PrivateKeyValidator = require('../../../validators/PrivateKeyValidator')
const PrivateKeyServiceBuilder = require('../../../../src/factories/PrivateKeyServiceBuilder')
const TradingWalletServiceBuilder = require('../../TradingWalletServiceBuilder')

const privateKeyService = PrivateKeyServiceBuilder.build()

const privateKeyValidator = new PrivateKeyValidator(logger)
const tradingWalletService = TradingWalletServiceBuilder.build()

/**
* Class representing a simple factory to build CreateWalletCommand object.
*/
class CreateWalletCommandBuilder {
static build() {
const createWalletCommandValidator = new CreateWalletCommandValidator(logger)
const getAllowanceCommandValidator = new GetAllowanceCommandValidator(logger)
const createWalletCommand = new CreateWalletCommand(logger, getAllowanceCommandValidator,
const createWalletCommand = new CreateWalletCommand(logger, tradingWalletService,
createWalletCommandValidator, privateKeyService, privateKeyValidator)
return createWalletCommand
}
Expand Down

0 comments on commit fc3709e

Please sign in to comment.