diff --git a/lib/transactions/proposal.js b/lib/transactions/proposal.js index f14238e..6083a3c 100644 --- a/lib/transactions/proposal.js +++ b/lib/transactions/proposal.js @@ -2,7 +2,7 @@ var crypto = require("./crypto.js") var transaction = require('./transaction.js') /*function propose(options, secret, secondSecret) { - var keys = crypto.getKeys(secret); + var keys = crypto.getKeys(secret); return transaction.createTransactionEx({ type: 300, fee: 10 * 1e8, @@ -13,38 +13,39 @@ var transaction = require('./transaction.js') }*/ function registergateway(options, secret, secondSecret) { - let keys = crypto.getKeys(secret); - let currency = { + + let keys = crypto.getKeys(secret); + let currency = { symbol : options.symbol, desc: options.currencyDesc, - precision : options.precision - } - // construct this content - let content = { - name : options.name, - desc : options.desc, - minimumMembers: options.minimumMembers, - updateInterval: options.updateInterval, - currency: currency - } - return transaction.createTransactionEx({ - type: 300, - fee: 10 * 1e8, - secret: secret, - secondSecret, secondSecret, - args: [options.title, options.desc, 'gateway_register', content, options.endHeight] + precision : options.precision + } + // construct this content + let content = { + name : options.name, + desc : options.desc, + minimumMembers: options.minimumMembers, + updateInterval: options.updateInterval, + currency: currency + } + return transaction.createTransactionEx({ + type: 300, + fee: 10 * 1e8, + secret: secret, + secondSecret, secondSecret, + args: [options.title, options.desc, 'gateway_register', content, options.endHeight] }) } function initgateway(options, secret, secondSecret) { - - let keys = crypto.getKeys(secret); - // construct this content - let content = { - gateway : options.name, - members: options.members - } - + + let keys = crypto.getKeys(secret); + // construct this content + let content = { + gateway : options.name, + members: options.members + } + return transaction.createTransactionEx({ type: 300, fee: 10 * 1e8, @@ -55,8 +56,8 @@ function initgateway(options, secret, secondSecret) { } function activate(options, secret, secondSecret) { - - let keys = crypto.getKeys(secret); + + let keys = crypto.getKeys(secret); return transaction.createTransactionEx({ type: 302, fee: 0 * 1e8, @@ -67,8 +68,8 @@ function activate(options, secret, secondSecret) { } function upvote(options, secret, secondSecret) { - - let keys = crypto.getKeys(secret); + + let keys = crypto.getKeys(secret); return transaction.createTransactionEx({ type: 301, fee: 1e7, // 0.1 * 1e8 @@ -78,7 +79,6 @@ function upvote(options, secret, secondSecret) { }) } - module.exports = { //propose: propose registergateway: registergateway,