Repository navigation
App shell, flexible withdraw, locked plan form, upgrade - #469
Merged
Merged
Conversation
|
@Diyaq Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch had an error being deployed
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.
#110 — Authenticated app shell/layout
frontend/src/components/app/Sidebar.tsx: the main app navigation (Dashboard, Goals, Locked savings, Groups, Deposit & withdraw, Referrals, Settings). It marks the current section witharia-current="page"and has a Sign out button.frontend/src/app/(app)/layout.tsxnow wraps every(app)screen in a shell:AddressBadgefor the wallet./login?returnTo=<current path>, which the login page already reads, so they land back where they started.layout.test.tsxnow expects thereturnToredirect and checks that several guarded routes (/dashboard,/savings/locked/new,/settings) redirect when logged out. It also checks that the shell (sidebar, banner, main) wraps the content when signed in.Sidebar.test.tsxcovers the links, the active state and sign out.#116 — Withdraw modal (flexible)
frontend/src/hooks/useWithdraw.ts:validateWithdrawAmount(amount, balance)blocks empty, non-numeric, zero, over-precise (more than 7 decimals) and over-balance amounts. This mirrors the vault'sInsufficientBalancecheck.useWithdraw()sendsPOST /api/savings/flexible/withdrawwith{ owner, amount }. The amount is in stroops and each request carries anIdempotency-Key, following the same pattern asuseLockedTopUp. Status moves throughidle,pending,successanderror.frontend/src/components/savings/WithdrawModal.tsx:DepositModal.WithdrawModal.test.tsx. It checks that over-balance and empty amounts are blocked without calling the API, the confirmation step, the pending state, the error state, and that success shows the updated balance and callsonWithdrawnwith it.#118 — Locked savings create screen
frontend/src/hooks/useCreateLockedPlan.ts:validateUnlockDaterejects a missing date, an invalid date, and any date that is not in the future, including today. This mirrors the contract'sInvalidUnlockTime.useCreateLockedPlan()sendsPOST /api/savings/lockedwith{ owner, amount (stroops), unlock_at (ISO) }and anIdempotency-Key.frontend/src/components/savings/LockedPlanForm.tsx:minis tomorrow.frontend/src/app/(app)/savings/locked/new/page.tsx. It uses the session address as the plan owner and goes to/savings/locked/[id]after the plan is created.LockedPlanForm.test.tsxchecks that past dates and today are rejected without an API call, that required fields are enforced, that valid input submits the right payload after confirmation, and the pending and error states.#467 — Upgrade safety checklist
contracts/UPGRADE_CHECKLIST.md, written for Soroban. Each section has checkboxes and concrete steps to verify them:DataKeyvariants and payloads, the fields of stored structs, storage durability, id counters, TTLs, and how to run migrations. Verification is a testnet rehearsal: write state with the old Wasm, upgrade, and read it back.Errorcodes being renumbered, and event schema changes. Verification diffs the two Wasms withstellar contract inspect.AlreadyInitializedguard stays in place, no new public re-initializer is added, new config values have safe defaults, andadmin/tokenkeep their values after the upgrade.upgradedevent and the indexer, and keep a rollback plan.upgradeentry incontracts/savings-vault/README.mdnow links to the checklist.Closes #110
Closes #116
Closes #118
Closes #467