Pay game POL to any signature-linked wallet, on chain or not (2026-10-27)

InstantAdPay now pushes a member's signature-linked wallet whether or not it is activated (memberId 0 when not on chain).
- POST /api/iap/wallet accepts memberId 0/missing: the wallet fills the email-keyed player (sso.emailId) and its account;
  a player with no account row yet gets one holding the wallet. Signature check, fill-empty-only (different wallet 409),
  same wallet no-op and 404 for an unknown player are unchanged; a real memberId still adopts the email history first.
- /auth: a hand-off wallet fills an EMPTY account wallet so POL earned so far pays on the next sweep (never replaces one).
- game.adopt carries the wallet when the target account has none.
- /api/me: me.hasWallet (own wallet on file, also when it arrived by the push after the session began).
- play.js: no-wallet players see "Link your wallet to receive this POL" (IAP /my#wallet, new tab) on the chapter-clear
  result, the lobby member line and the balance card (which also lost a line that always overwrote the waiting-POL note);
  players with a wallet see the same text as before. play.js?v=20261027lw.
- test/run.js: memberId 0 push -> 200 changed:true -> sweep pays it; /auth memberId 0 wallet; 409; activation later.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-27 09:18:09 -05:00
parent eb2cb822ac
commit b70ecf6f75
5 changed files with 56 additions and 15 deletions
+1 -1
View File
@@ -205,6 +205,6 @@ canvas#game{position:absolute;inset:0;width:100%;height:100%;display:block;touch
<script src="https://instantadpay.com/assets/game-signin.js?v=20261003a" async></script>
<script src="https://instantadpay.com/assets/game-strip.js?v=20261003a"></script>
<script src="/spawn.js"></script>
<script src="/play.js?v=20261016gp"></script>
<script src="/play.js?v=20261027lw"></script>
</body>
</html>