0

I am trying to push a transaction to another account through eosjs. But before doing that I want to call the balance of that account to check if the person is trying to transfer a higher value than what is present in his account.

To do this I call the balance in another function. This part works, the balance comes back and I am able to compare it, but then my transaction push stops working. It gives me the error

Error: Abi 'tokenAccount' is not cached action.data transaction.actions

If however I remove this function, my transaction works perfectly.

I think it might be something to do with how I am setting the keyProvider, tell me if I am wrong.

Can I call another function which uses a different key provider than the function I am calling it from and then work?

I set the key provider like this

config.keyProvider = privateKey;
const eos = Eos(config);

in both the functions.

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.