2

I have a thing that has been annoying me when using truffle-contract, ever since updating from Truffle 2 to Truffle 3.

I am no longer able to run transactions synchronously - even though it is stated on the Github page for truffle-contract that:

}).then(function(result) { // This code block will not be executed until truffle-contract has verified // the transaction has been processed and it is included in a mined block. // truffle-contract will error if the transaction hasn't been processed in 120 seconds. // // Since we're using promises, we can return a promise for a call that will // check account two's balance. return coin.balances.call(account_two);

When I run my client application:

https://pastebin.com/MbbL2bJt

It calls the createAccount function and then right after it calls the setBalance function, which causes the setBalance to fail since the account is not created before this happens.

This seems to me like it is the opposite of what the statement from truffle-contract says it will do.

If anyone can help, I'll be ever grateful

  • Simon

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.