Skip to content

Commit

Permalink
#11 Add TradingWalletFacedBuilder
Browse files Browse the repository at this point in the history
  • Loading branch information
ceres3idoo committed Feb 22, 2019
1 parent 5ad8a7c commit e83268a
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 0 deletions.
19 changes: 19 additions & 0 deletions src/factories/TransactionLibBuilder.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
const Web3 = require('web3')

const logger = require('../logger')

const { TransactionLib } = require('../lib/TransactionLib')

const providerUrl = 'urlToProvider'
const web3 = new Web3(new Web3.providers.HttpProvider(providerUrl))

/**
* Class representing a simple factory to build Transaction lib object.
*/
class TransactionLibBuilder {
static build() {
return new TransactionLib(web3, logger)
}
}

module.exports = TransactionLibBuilder
2 changes: 2 additions & 0 deletions src/factories/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,13 @@ const Erc20TokenServiceBuilder = require('./Erc20TokenServiceBuilder')
const OrderPayloadBuilder = require('./OrderPayloadBuilder')
const TradingWalletServiceBuilder = require('./TradingWalletServiceBuilder')
const TradingWalletTransactionBuilder = require('./TradingWalletTransactionBuilder')
const TransactionLibBuilder = require('./TransactionLibBuilder')

module.exports = {
Erc20TokenTransactionBuilder,
Erc20TokenServiceBuilder,
OrderPayloadBuilder,
TradingWalletServiceBuilder,
TradingWalletTransactionBuilder,
TransactionLibBuilder,
}

0 comments on commit e83268a

Please sign in to comment.