fix(store): 購入 hook が商品切替で進行中の結果を捨てず古い署名を送っていたのを直し二重署名の入口を塞ぐ (B-R15d・掟 15) - #633
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
cipherwebllc
force-pushed
the
fix/r6-r15b-purchase-parsers
branch
from
September 24, 2026 15:11
9498528 to
8a6f937
Compare
…掟 15) 第 6 回レビュー R15b で固定した既存の不具合。商品が切り替わっても進行中の quote/署名/送信結果を 捨てず、古い商品の quote が review に出る・古い署名が見えないまま送られる・古い 200 settled で quote=null の provisioning に入って止まっていた。wallet 切替と同じ形で商品切替でも捨てる (product_changed・signedRequest の同一性で古い完了を無視)。レビューで見つかった既存の入口も塞ぐ: 署名/送信中の chain 切替で開始画面に落ちて再署名できた (確認画面を出し続け操作を disabled)・ prepare() が未解決の署名済み request の間も受け付けていた (purchase_in_progress で拒否)。 responseJson の null 本文の扱いは変えない (plans に記録)。 Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc
cipherwebllc
force-pushed
the
fix/r6-b15d-purchase-hook-switch
branch
from
September 24, 2026 16:05
f463608 to
949e77c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
第 6 回レビュー R15b (#622) で固定した既存の不具合の修正 (B-R15d) です。#622 の上に積んだ PR で、#622 の merge 後に main へ付け替わります。意図的な挙動変更で、money-path (Creator Store の購入) です。
直した不具合
Creator Store の購入 hook は、wallet の切り替えでは進行中の結果を捨てるのに、商品の切り替えでは捨てていませんでした。
商品の切り替えも wallet の切り替えと同じ形で扱い、切り替え前の見積もり・署名・送信結果をすべて無視します (新しい内部 error code
product_changed)。送信完了の判定は署名済み request の同一性で行うため、wallet を A→B→A と戻す経路の穴も同時に塞がります。レビューで見つかった既存の入口 (同じ PR で修正)
prepare()が、未解決の署名済み request があるあいだも新しい購入を受け付けていました →reset()と同じ条件と署名中を拒否します (内部 error codepurchase_in_progress)。お金への影響 (レビューの評価)
検証
残る表示の隙間 (お金の危険なし)
署名中に JPYC の署名プレビューを組み立てられない場合 (見積もり切れ等) は、確認画面ではなく開始画面に戻ります。操作は無効化され
prepare()も拒否するため、再署名はできません。🤖 Generated with Claude Code
https://claude.ai/code/session_01HeizmagJBgL5peL5mQpxkc