Skip to content

Fix: 2 issues (#1058, #1063) - #1124

Open
whiteghost0001 wants to merge 1 commit into
Fracverse:masterfrom
whiteghost0001:simple/1058-1063
Open

whiteghost0001 wants to merge 1 commit into
Fracverse:masterfrom
whiteghost0001:simple/1058-1063

Conversation

@whiteghost0001

Copy link
Copy Markdown

Closes #1058
Closes #1063

Issues

#1058 frontend: [Dashboard] DASHBOARD [DB-005]: Build admin system configuration page

Description

Allow admins to adjust naira stablecoin transaction fee settings.

Files to Edit/Create

  • dashboard/app/dashboard/contracts/page.tsx

Acceptance Criteria

  • Form updates contract parameter states on-chain.

Guidance / Hints

Submit transaction updating fee coefficient inside payment contract.

#1063 frontend: [Dashboard] DASHBOARD [DB-010]: Build historical yield transactions audit list

Description

Render detailed data table for tracking vault interactions.

Files to Edit/Create

  • dashboard/app/dashboard/yield/page.tsx

Acceptance Criteria

  • Show tx hash, timestamp, user, action type, and token volume.

Guidance / Hints

Support column sorting and search filters.

Summary

Both pages already contain substantial scaffolding; focus on completing the on-chain submission path for the fee form and the full sortable/searchable table UI for the audit list. Keep the superadmin gate on fee changes. For the on-chain fee update, prefer a backend builder endpoint that returns an unsigned XDR, then sign with Freighter and submit; if no builder exists, construct the invoke_contract_function XDR client-side. For the audit table, reuse the existing YieldTx type and api.yieldAuditLogs, and make sure pagination uses the API total rather than only the loaded page.

Changes

  • Build the admin system configuration page for naira stablecoin fee settings. The page already has a FeeConfigPanel that reads the current fee coefficient via api.contractConfig() and submits via api.setFeeCoefficient(). Wire the submit flow to an actual on-chain Soroban transaction: use useWallet() from lib/wallet-context to get the connected wallet, build a contract-invocation XDR for the payment contract's set_fee_coefficient method (or call the backend builder endpoint if available), sign it with wallet.signTransaction(xdr, networkPassphrase), submit it, and only then call api.setFeeCoefficient to persist/refresh state. Keep the superadmin gate, basis-point validation (0-10000), percent display, loading/error/success feedback, and refresh the current value after success. Ensure the form is disabled when the wallet is not connected and surfaces a clear message. (dashboard/app/dashboard/contracts/page.tsx)
  • Build the historical yield transactions audit list. The page already defines YieldTx, fetches via api.yieldAuditLogs(), and has search/action/date filters plus sort state. Complete the audit tab UI: render a data table with columns for tx hash (truncated with copy), timestamp (formatted), user/address (truncated), action type (badge), and token volume (with asset), plus optional block height/fee. Implement clickable column headers that toggle sortKey/sortAsc for timestamp, address, action, and tokenVolume; wire the search input and action/date filters to the fetch and to client-side filtering; add pagination controls using the total from the API; and show loading, empty, and error states. Ensure the table is reachable from the audit tab and that config audit entries created on submit are merged in. (dashboard/app/dashboard/yield/page.tsx)
  • Add or extend the API client helpers needed by both pages. Ensure contractConfig() and setFeeCoefficient(fee_coefficient) exist and return the current coefficient and tx hash, and that yieldAuditLogs(params) supports q, action, limit, offset, from, and to and returns { items, total } with fields id, tx_hash, created_at, address, type, amount, asset, block_height, fee. Add a helper to build/submit the fee-coefficient contract invocation if the backend exposes one, or document the expected endpoint shape so the contracts page can sign and submit on-chain. (dashboard/lib/api.ts)
  • Ensure the wallet context exposes everything the contracts page needs to sign the fee-coefficient transaction: connected state, publicKey, signTransaction(xdr, networkPassphrase), and error handling. Verify signTransaction throws a clear error when the wallet is disconnected and that the provider is mounted in the dashboard layout so useWallet() works on the contracts page. (dashboard/lib/wallet-context.tsx)
  • Confirm the payment contract exposes an admin-only set_fee_coefficient entrypoint that updates FEE_COEFF_KEY and emits an event, and that fee_coefficient() reads it. If missing or not admin-gated, add require_auth on the admin and the storage update so the dashboard's on-chain transaction has a valid target method. (contracts/contracts/social_payment/src/lib.rs)
  • Verify the yield history endpoint backing api.yieldAuditLogs() supports q, action, from, to, limit, and offset query parameters and returns items with tx_hash, created_at, address, type, amount, asset, block_height, and fee plus a total count. Add or adjust the handler and SQL query so the dashboard audit table can sort and filter server-side if needed. (backend/src/api/yield.rs)

Co-authored-by: Simple Agent <agent@simple.dev>
@drips-wave

drips-wave Bot commented Oct 18, 2026

Copy link
Copy Markdown

@whiteghost0001 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! 🚀

Learn more about application limits

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

Labels

None yet

Projects

None yet

1 participant