Skip to content
Snippets Groups Projects
Commit 2440e9d1 authored by Robert Martin-Legene's avatar Robert Martin-Legene
Browse files

MasterDistiller necesita numeros muy grandes.

parent c8a55681
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ ...@@ -2,6 +2,7 @@
"use strict" "use strict"
const BigInteger = require('big-integer');
const Libbfa = require( process.env.BFAHOME + '/bin/libbfa.js'); const Libbfa = require( process.env.BFAHOME + '/bin/libbfa.js');
const rl = require('readline').createInterface( const rl = require('readline').createInterface(
{ input: process.stdin, output: process.stdout } { input: process.stdin, output: process.stdout }
...@@ -192,9 +193,9 @@ function editAccount( entry, pallet ) ...@@ -192,9 +193,9 @@ function editAccount( entry, pallet )
(answer) => { (answer) => {
if ( bfa.isNumeric(answer) ) if ( bfa.isNumeric(answer) )
{ {
answer *= notation[1]; var bi = BigInteger( answer ).multiply( notation[1] );
console.log("Sending update to the SC..."); console.log("Sending update to the SC...");
Distillery.methods.setEtherAllowance(acct,answer) Distillery.methods.setEtherAllowance(acct,web3.utils.toHex(bi))
.send( {"from": bfa.account } ) .send( {"from": bfa.account } )
.then( .then(
function(a){ function(a){
......
...@@ -87,6 +87,11 @@ ...@@ -87,6 +87,11 @@
"tweetnacl": "^0.14.3" "tweetnacl": "^0.14.3"
} }
}, },
"big-integer": {
"version": "1.6.43",
"resolved": "https://registry.npmjs.org/big-integer/-/big-integer-1.6.43.tgz",
"integrity": "sha512-9dULc9jsKmXl0Aeunug8wbF+58n+hQoFjqClN7WeZwGLh0XJUWyJJ9Ee+Ep+Ql/J9fRsTVaeThp8MhiCCrY0Jg=="
},
"bindings": { "bindings": {
"version": "1.5.0", "version": "1.5.0",
"resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz",
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
"version": "1.0.0", "version": "1.0.0",
"description": "Blockchain Federal Argentina", "description": "Blockchain Federal Argentina",
"dependencies": { "dependencies": {
"big-integer": "^1.6.43",
"request": "^2.88.0", "request": "^2.88.0",
"require": "^2.4.20", "require": "^2.4.20",
"web3": "^1.0.0-beta.55" "web3": "^1.0.0-beta.55"
......
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