AcalaNetwork / chopsticks

Create parallel reality of your Substrate network.
Apache License 2.0
133 stars 80 forks source link

Event "isBroadcast" never fired #568

Closed Tbaut closed 10 months ago

Tbaut commented 10 months ago

To test my UI, I'm checking for Tx events. I have a code that looks like

api.tx.balances
  .transfer(recipient, 123)
  .signAndSend(sender, ({ status, events }) => {
    console.log(status)
 })

It goes from isReady, to isInBlock and isFinalized without the isBroadcast.

It's somewhat similar to https://github.com/AcalaNetwork/chopsticks/issues/434#issuecomment-1762958798

ermalkaleci commented 10 months ago

broadcast is chain thing, when tx is broadcasted to other chains. Chopsticks is a standalone simulator chain. This RPC is a simulation. If you really need it we can just fire it right after isReady

Tbaut commented 10 months ago

Anything is a chain thing isn't it? I know it's a simulation, my goal is to come as close to a real chain as possible, so I'd like Chopsticks to pretend, and fire the same events as the real chain.

If you really need it we can just fire it right after isReady

Sure, that would work.

ermalkaleci commented 10 months ago

@Tbaut give this a try

Tbaut commented 10 months ago

Thanks Ermal, this is not published as a beta automatically is it? This would make things easier to test for me rather than master. I'll wait for the next beta release

ermalkaleci commented 10 months ago

@Tbaut releasing new beta

Tbaut commented 10 months ago

it's working well, thanks a lot!