I am trying to test if(tk0 == address.GGG) this fails but should be true. if I do this it works if(tk0 == "1234567890") then it works. I can read address.GGG before the if in console.log and after the if in console.log.. they both show typeof string when tested. I am at a loss.. I have also tried to set GGG with let and var no dice.
const addresses = {
GGG: '1234567890',
PPP: '4958938485'
}
//I know that tk0 is going to = GGG for this example.
factory.on('something', async (tk0, tk1, pa) => {
let tkIn , tkOut ;
if(tk0 == addresses.GGG) {
tkIn = tk0;
}
console.log(`tkIn: ${tkIn}`);
});