Problem
So basically what I am trying to do is to send Transactions that were signed by an account that was generated by ethereumjs-wallet so my node don't keep UTC file and therefore I don't have an issue if someone stealing accounts UTC file. But my contract doesn't execute if there is no UTC file, on a node, for an address that signed my transaction.
This is part of a code that I used for sending Tx.
utils.askForInput('Owner address: ')
.then((ownerAddr) => {
Tx.ownerAddr = ownerAddr;
return utils.askForInput('New wallet address: ');
}).then(async (newAddr) => {
const data = await utils.prepareData('addWallet', newAddr);
const nonce = await utils.getAccountNonce(Tx.ownerAddr);
console.log('Data: ' + data);
console.log('Nonce: ' + nonce);
return utils.askForInput('Signed Transaction: ');
}).then(async (signedTx) => {
await utils.sendRawTransaction(signedTx);
utils.closeReadLine();
}).catch((err) => {
console.log(err);
utils.closeReadLine();
});
Possible solution
I can just create UTC file and call contract and after I am done with everything I can just delete UTC file. But I think it is a hack. My Q is why this is the case and is it necessary to solve it like this.
Just to point out my code works, if UTC file is created for that account.