fcl-js
                                
                                 fcl-js copied to clipboard
                                
                                    fcl-js copied to clipboard
                            
                            
                            
                        Fcl authorization routine not interrupted after starting a new one
Instructions
To test it out I used the example Dapp and example Wallet from this repo. I tested with FCL 1.0.3-alpha.0 and FCL 1.3.1 to be sure it wasn't coming from the library version being outdated.
Problem
From what we can read here "Conversely, when FCL sends a new ExtensionServiceInitiationMessage, the previous routine is interrupted. (This is the case even when the new service invocation is targeted at a different extension.)" FCL's routine should be reset every time it emits a new ExtensionServiceInitiationMessage but in practice this is not the case.
Steps to Reproduce
- Build Harness (The example Dapp) and the Example wallet.
- Click log in on Harness, confirm in the wallet pop up
- Click mutate 1 on Harness and select the example wallet in the wallet discovery
- Click mutate 2 on Harness and select the example wallet in the wallet discovery At this point you while notice that instead of having only 2 popups you will have 3.
- Go back to either of the extension authorization popups and confirm it. if you look at Harness's console, you will notice that even if you confirmed one pop up, the two scripts were sent, you can see them here and here .
https://user-images.githubusercontent.com/89280320/195133882-7900ee62-0758-497b-a200-747d53039429.mp4
Acceptance Criteria
Cleaning FCL's routine when emitting a new ExtensionServiceInitiationMessage.
Context
I am currently working on a wallet and this makes me unable to make the signing part since when the signable is returned, all the scripts from previous routines are also signed and sent to the chain.