The scenario: One user has 2 browser windows pointing to the same channel with the extension open.
They useBits on one window -> onTransactionComplete is called on both.
I use onTransactionComplete to know when a user has actually spent bits and I can safely trigger the action they paid for. In my case, I call my EBS. In a scenario like this though, I end up calling it twice and thus triggering the same action twice.
Both actions are triggered pretty much at the same time, so there is no time for me to write the timestamp to my DB and try to read that on the second call in an attempt to invalidate it.
Do you have any similar scenarios? How do you deal with them? Is there another way to know for sure that a user has now spent their bits?