Skip to content
Snippets Groups Projects
Commit 1e0f8620 authored by Renzo Mauro Ontivero's avatar Renzo Mauro Ontivero
Browse files

Unificando los inputs

parent 07fdb010
No related branches found
No related tags found
No related merge requests found
...@@ -190,7 +190,7 @@ module.exports = { ...@@ -190,7 +190,7 @@ module.exports = {
send: async function(req, res){ send: async function(req, res){
var _from = req.body.from; var _from = req.body.from;
var _to = req.body.to; var _to = req.body.to;
var _ether = req.body.value_ars; var _ether = req.body.value;
var private_key = Buffer.from( var private_key = Buffer.from(
req.body.private_key.substr(2), req.body.private_key.substr(2),
'hex', 'hex',
......
...@@ -45,7 +45,7 @@ module.exports = { ...@@ -45,7 +45,7 @@ module.exports = {
// 14. Get the Gold Token contract wrapper // 14. Get the Gold Token contract wrapper
let goldtoken = await kit.contracts.getGoldToken() let goldtoken = await kit.contracts.getGoldToken()
sails.log("Camperiño")
// 15. Transfer gold from your account to anAddress // 15. Transfer gold from your account to anAddress
let tx = await goldtoken.transfer(to, amount).send({from: from}) let tx = await goldtoken.transfer(to, amount).send({from: from})
......
...@@ -193,7 +193,7 @@ module.exports = { ...@@ -193,7 +193,7 @@ module.exports = {
send: async function(req, res){ send: async function(req, res){
var _from = req.body.from; var _from = req.body.from;
var _to = req.body.to; var _to = req.body.to;
var _ether = req.body.value_ars; var _ether = req.body.value;
var private_key = Buffer.from( var private_key = Buffer.from(
req.body.private_key.substr(2), req.body.private_key.substr(2),
'hex', 'hex',
......
...@@ -190,7 +190,7 @@ module.exports = { ...@@ -190,7 +190,7 @@ module.exports = {
send: async function(req, res){ send: async function(req, res){
var _from = req.body.from; var _from = req.body.from;
var _to = req.body.to; var _to = req.body.to;
var _ether = req.body.value_ars; var _ether = req.body.value;
var private_key = Buffer.from( var private_key = Buffer.from(
req.body.private_key.substr(2), req.body.private_key.substr(2),
'hex', 'hex',
...@@ -221,7 +221,7 @@ module.exports = { ...@@ -221,7 +221,7 @@ module.exports = {
to: _to, to: _to,
gasLimit: web3.utils.toHex(21000), gasLimit: web3.utils.toHex(21000),
gasPrice: web3.utils.toHex(web3.utils.toWei('1000', 'gwei')), gasPrice: web3.utils.toHex(web3.utils.toWei('1000', 'gwei')),
value: web3.utils.toHex(web3.utils.toWei(usdToRbtc.toString(), "ether")), value: web3.utils.toHex(web3.utils.toWei(usdToRbtc.toString().substring(0, 16), "ether")),
} }
// Firmar la transaccion // Firmar la transaccion
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment