Game POL pays to any LINKED wallet (Marty approved "build all three", 2026-10-27)

- walletnudge.js: the hourly push hands the member's signature-linked wallet (accounts.address, only set by
  auth.verifyChallenge -> accounts.linkWallet) to every game holding an unpaid balance, activated or not; memberId is the
  on-chain id when there is one, else 0 (a failed chain read falls back to the stored id instead of skipping the row).
  Holding-tank members waiting to switch on payouts no longer have their game POL stuck. Game side unchanged contract:
  signed POST, fill-empty-only (different wallet = 409, retried once a day), idempotent.
- Nudge copy (no linked wallet only): "You've earned X POL in <game>. Link your wallet (one free signature) and it's sent
  automatically, including everything you've earned so far." + /my#wallet; never mentions switching on payouts.
- The IAP -> game /auth tokens already carried wallet: a.address regardless of activation (no change).
- chatbot.js: game-pol-wallet canned answer (ahead of the per-game entries) + GAME POL TO ANY LINKED WALLET prompt fact
- qa/walletnudge.test.cjs (mock game: non-activated push with memberId 0, activated push, chain-read failure, nudge copy,
  409 refusal + daily retry), wired into qa/run.sh member + walletnudge; chatbot-parse routing cases for the new answer

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
martbost
2026-10-27 09:19:10 -05:00
parent fa5acf0745
commit 1089942bca
5 changed files with 157 additions and 12 deletions
+5 -2
View File
@@ -76,7 +76,8 @@ const WANT = {
PIF: /PIF is a gift/,
PRICE: /Five packages, priced/,
EARN: /Every package splits the same way/,
TANK: /The holding tank is where free members/
TANK: /The holding tank is where free members/,
GAMEPOL: /Game POL is paid to the wallet linked/
};
const ROUTES = [
['PIF', 'should I pif someone from the holding tank'], ['PIF', 'what is pif'],
@@ -89,7 +90,9 @@ const ROUTES = [
['PRICE', 'how much does it cost'],
['EARN', 'how much do I earn'], ['EARN', 'how much can i make'],
['EARN', 'what will i get paid'], ['EARN', 'what is the commission'],
['TANK', 'how does the holding tank work'], ['TANK', 'can I adopt someone from the tank']
['TANK', 'how does the holding tank work'], ['TANK', 'can I adopt someone from the tank'],
['GAMEPOL', 'my gem kingdom pol was never sent'], ['GAMEPOL', 'it says 1.50 POL is waiting for your wallet'],
['GAMEPOL', 'do I need to switch on payouts to get my game pol']
];
for (const [want, q] of ROUTES) {
const reply = await ask(q);