Commit 3073511e authored by Marek Kotewicz's avatar Marek Kotewicz

not parsing transaction output

parent e45db42e
...@@ -488,22 +488,24 @@ var contract = function (address, desc) { ...@@ -488,22 +488,24 @@ var contract = function (address, desc) {
options.to = address; options.to = address;
options.data = signature + parsed; options.data = signature + parsed;
var output = ""; var isTransact = result._isTransact;
if (result._isTransact) {
// reset
result._options = {};
result._isTransact = false;
if (isTransact) {
// it's used byt natspec.js // it's used byt natspec.js
// TODO: figure out better way to solve this // TODO: figure out better way to solve this
web3._currentContractAbi = desc; web3._currentContractAbi = desc;
web3._currentContractAddress = address; web3._currentContractAddress = address;
output = web3.eth.transact(options); // transactions do not have any output, cause we do not know, when they will be processed
} else { web3.eth.transact(options);
output = web3.eth.call(options); return;
} }
// reset var output = web3.eth.call(options);
result._options = {};
result._isTransact = false;
return outputParser[displayName][typeName](output); return outputParser[displayName][typeName](output);
}; };
......
This diff is collapsed.
This diff is collapsed.
...@@ -77,22 +77,24 @@ var contract = function (address, desc) { ...@@ -77,22 +77,24 @@ var contract = function (address, desc) {
options.to = address; options.to = address;
options.data = signature + parsed; options.data = signature + parsed;
var output = ""; var isTransact = result._isTransact;
if (result._isTransact) {
// reset
result._options = {};
result._isTransact = false;
if (isTransact) {
// it's used byt natspec.js // it's used byt natspec.js
// TODO: figure out better way to solve this // TODO: figure out better way to solve this
web3._currentContractAbi = desc; web3._currentContractAbi = desc;
web3._currentContractAddress = address; web3._currentContractAddress = address;
output = web3.eth.transact(options); // transactions do not have any output, cause we do not know, when they will be processed
} else { web3.eth.transact(options);
output = web3.eth.call(options); return;
} }
// reset var output = web3.eth.call(options);
result._options = {};
result._isTransact = false;
return outputParser[displayName][typeName](output); return outputParser[displayName][typeName](output);
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment