I'm testing and creating a smart contract to send some ether to one account using TestRPC, Truffle and Metamask.
I have a page with a button, when i click on the button it fires the event submitEtherWallet
submitEtherToWallet: function() {
MyWallet.deployed().then(function(instance){
return instance.sendTransaction({from: account, to: instance.address, value: web3.toWei(5, 'ether')});
}).then(function(result) {
App.basicInfoUpdate();
});
},
The method aparently is working well, because metamask open a popup to confirm the transacation.
After click to submit the transaction:
Best Answer
Are you sure, in the code, that "from: account" refers to accounts[0] ?