Skip to content

Commit

Permalink
Update proposal.js
Browse files Browse the repository at this point in the history
  • Loading branch information
bassjobsen authored Sep 5, 2018
1 parent 188309e commit d668055
Showing 1 changed file with 32 additions and 32 deletions.
64 changes: 32 additions & 32 deletions lib/transactions/proposal.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -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,
Expand All @@ -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,
Expand All @@ -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
Expand All @@ -78,7 +79,6 @@ function upvote(options, secret, secondSecret) {
})
}


module.exports = {
//propose: propose
registergateway: registergateway,
Expand Down

0 comments on commit d668055

Please sign in to comment.