Skip to content

Repair IFZI wallet connection, mining rewards and admin visibility - #6

Open
fahwaofficial wants to merge 23 commits into
mainfrom
ifzi-wallet-mining-repair
Open

fahwaofficial wants to merge 23 commits into
mainfrom
ifzi-wallet-mining-repair

Conversation

@fahwaofficial

@fahwaofficial fahwaofficial commented Nov 19, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Open the TON wallet chooser immediately while the secure TON Proof challenge loads; an API outage no longer blocks the chooser. Mining and withdrawals remain locked until server-side TON Proof succeeds.
  • Persist the authenticated TonConnect wallet session, renew its 30-day JWT on return, and provide an explicit disconnect button.
  • Preserve manual admin approval for newly verified wallets. New wallets appear in the admin approval queue; mining begins automatically after approval is restored.
  • Add a live public mining-pool endpoint and remaining-allocation meter based on D1 pool accounting.
  • Add an admin-only connected-wallet registry with sequential numbering, Tonviewer links, copy-address controls and on-chain IFZI balance lookups.
  • Apply the agreed holder bonus at cycle start: at least 10,000 IFZI held gives +50% for levels 1–5 and +25% for levels 6–11.
  • Add API/D1/secret readiness diagnostics.
  • Keep the user-entered withdrawal amount and the 1,000 IFZI minimum.

Safety

  • No D1 tables are dropped, recreated or rewritten by this PR.
  • The existing additive migration was tested against the production-schema snapshot in SQLite; seeded user, reward balance, pending withdrawal and pool allocation remained intact.
  • Wallet ownership still requires a TON Proof signature. The public key is extracted from the wallet StateInit and a supplied public key is only cross-checked, never trusted as the source.
  • No seed phrases or private keys are requested.
  • The wallet chooser can open during an API outage, but a wallet without a verified TON Proof cannot mine or withdraw.

Deployment gate

  • The live Worker health/ready endpoint, Cloudflare secrets, D1 binding and a real TON wallet end-to-end flow have not been verified from this environment.
  • GitHub currently reports no CI status checks for the latest branch head; do not treat this PR as production-tested until the Worker typecheck, dependency audit, dry-run deploy and live wallet flow pass.
  • Back up the existing D1 database before production deployment.

@fahwaofficial
fahwaofficial marked this pull request as ready for review November 19, 2026 04:15

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant