Skip to content

Fix/scheduled payments retry logic#32

Open
daree-dev wants to merge 5 commits into
Kalebtron1:mainfrom
daree-dev:fix/scheduled-payments-retry-logic
Open

Fix/scheduled payments retry logic#32
daree-dev wants to merge 5 commits into
Kalebtron1:mainfrom
daree-dev:fix/scheduled-payments-retry-logic

Conversation

@daree-dev
Copy link
Copy Markdown
Contributor

Closes #248

…Kalebtron1#2)

- Fix onboarding skip/finish routing to /login instead of / (fresh user loop)
- Add already-logged-in redirect guard on Login page
- Expand friendlyError to cover locked wallet and network failures
- Add animate-shake keyframe that was referenced but missing
- Remove useWallet.ts duplicate; merge shortWallet + disconnect into useWallet.tsx
- Add walletStatus (connected/disconnected/missing) to useWallet hook
- Surface disconnected wallet banner in Index with Reconectar CTA
- Fix WalletSetupModal dead-end when Freighter missing: show Albedo fallback
- Add explicit retry button on every error state in WalletSetupModal
- Fix WalletGate null render during loading; re-query profile on modal close
- Add PR_TEST_CHECKLIST.md with pass/fail table for all error states
- Install i18next + react-i18next
- Add src/i18n/locales/es.ts as single source of truth for all Spanish strings
- Add src/i18n/config.ts with fallback and missing-key handler
- Add src/i18n/useLanguage.ts hook for future language switching
- Wire i18n init in src/main.tsx before app renders
- Migrate high-traffic flows: Login, Onboarding, Index, BottomNav, ActivityList, DepositModal, WalletSetupModal

Key naming convention: namespace.section.element
Example: login.errors.popup_blocked, deposit.success_title

Closes Kalebtron1#6
- Fix inverted Stellar effect type mapping in calculate-score.js
  (account_credited = deposit, account_debited = withdrawal)
- Make totalDeposited required in calculate-score.js to prevent
  silent score collapse when param is missing; add Stellar address validation
- Fix tier name inversion in get-user-data.js (3=Diamante, 4=Platino)
- Return success:false on contract failure in get-available-credit.js
  so callers can distinguish real Bronce from a failed RPC lookup
- Handle success:false in CreditSection.tsx instead of silently ignoring it
- Lock withdrawn amount at loan time in CreditSection.tsx so a mid-loan
  tier change does not silently alter the displayed debt

Closes Kalebtron1#3
- Add migration 001_create_scheduled_payments with retry_count and last_error columns
- Add processing status as duplicate-submission guard
- Implement processScheduledPayments job with MAX_RETRIES=3
- Mark completed with tx_hash on success, failed after 3 attempts
- Wire job into server.js (runs on startup + every 60s)
- Add @supabase/supabase-js to backend dependencies
- Update Supabase TypeScript types for scheduled_payments table
- Add SUPABASE_SERVICE_ROLE_KEY to .env.example
@vercel
Copy link
Copy Markdown

vercel Bot commented Apr 27, 2026

@daree-dev is attempting to deploy a commit to the alankcr1-6443's projects Team on Vercel.

A member of the Team first needs to authorize it.

- Add migration 002 to add retry_count and last_error columns
- Extend status CHECK constraint to include 'failed'
- Add partial index for efficient pending+retryable row queries
- Job already handles increment, last_error, max retries cap, and tx_hash on success
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