Toniq-Labs / stoic-identity

Identity for DFINITY's IC HttpAgent (to connect to a Stoic wallet via Stoic Connect)
MIT License
27 stars 16 forks source link

v3.0.0 needs urgent fix! #14

Open tiagoicp opened 2 months ago

tiagoicp commented 2 months ago

Hi @stephenandrews ,

Thanks for working again on this package, in good need of maintenance.

On latest release, you introduced 2 bugs. It stopped working on my end, and spent an hour debugging it. Here are the findings.

Missing target: "STOIC-IFRAME" on data of _postToFrame

When you refactored to be used for _postToPopUp, you didn't compensate on the frame method the need for a "target". I added data[`target`] = "STOIC-IFRAME"; on line 265 of index.js

Accidental change of .target for .action on Message listener/handler

On latest version, on line 309 of index.js you changed e.data.target === "STOIC-EXT" to e.data.action === "STOIC-EXT", while the behavior on https://www.stoicwallet.com/ remained the same. Therefore the if is now returning false and nothing happens 😕 Reverted that change.

With those 2 fixes, v3.0.0 is working as expected.

Hope you can release a hotfix asap, thanks 🙏

And welcome back :)

tiagoicp commented 1 month ago

Hi @stephenandrews , any news on this front?

Thanks 🙏