async function sendEos (sender, receiver ) {
try{
const result = await api.transact({
actions: [{
account: 'eosio.token', //'eosio.token',
name: 'transfer', //'transfer',
authorization: [{
actor: sender, //'useraaaaaaaa',
permission: 'active',
}],
data: {
from: sender,
to: receiver,
quantity: '1 EOS',
memo: '',
},
}]
}, {
blocksBehind: 3,
expireSeconds: 30,
});
console.dir(result);
}catch (e) {
console.log('\nCaught exception: ' + e);
if (e instanceof RpcError)
console.log(JSON.stringify(e.json, null, 2))}};
Getting error:
Caught exception: Error: assertion failure with message: symbol precision mismatch (node:12620) UnhandledPromiseRejectionWarning: ReferenceError: RpcError is not defined
at sendEos (E:\EOSIO\transactEos.js:45:22)
at process._tickCallback (internal/process/next_tick.js:68:7)
What fields do I need to change? I hope someone can guide me. Thanks in advance!