Skip to content

feat(stellar): add transaction history for wallet activities#96

Open
shadrach68 wants to merge 3 commits into
SudiptaPaul-31:mainfrom
shadrach68:TranHistory
Open

feat(stellar): add transaction history for wallet activities#96
shadrach68 wants to merge 3 commits into
SudiptaPaul-31:mainfrom
shadrach68:TranHistory

Conversation

@shadrach68
Copy link
Copy Markdown
Contributor

closes #85
Add Transaction History for Wallet Activities

Description

This PR implements a backend service and frontend UI to track and display blockchain-related wallet activities. The system maintains a secure, queryable log of all actions associated with a connected Stellar wallet, providing users with a clear, paginated view of their activity to ensure transparency.

Related Issue

fixes #85

Type of Change

  • Bug fix (non-breaking)
  • New feature (non-breaking)
  • Breaking change
  • Documentation update

Changes Made

  • Database: Created the transactions table and added database functions (createTransaction, getTransactionsByWallet) to track logs.
  • API: Implemented GET and POST at /api/transactions with built-in pagination and error handling.
  • Frontend UI: Built the app/transactions/page.tsx page to display the user's wallet activity cleanly.
  • Action Logging: Integrated automatic logging for:
    • Wallet connections (Freighter & Albedo).
    • Snippet updates and deletions.
    • Snippet version restorations.
  • Navigation: Added the "Activity" link to the main navigation bar.

Testing

How to test these changes:

  1. Ensure your local database has the new table by running the scripts/add-transactions.sql migration.
  2. Connect your wallet via the navbar "Connect Wallet" button.
  3. Navigate to the newly added Activity tab in the navbar.
  4. Verify the initial wallet_connect transaction appears.
  5. Edit, delete, or restore a snippet, and check the Activity page to ensure the new actions are logged and displayed correctly.

Database Migration Required

Before testing, run the following SQL in your Neon database:

CREATE TABLE IF NOT EXISTS transactions (
  id UUID PRIMARY KEY,
  wallet_address VARCHAR(255) NOT NULL,
  type VARCHAR(100) NOT NULL,
  description TEXT,
  metadata JSONB,
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);

CREATE INDEX IF NOT EXISTS idx_transactions_wallet_address ON transactions(wallet_address, created_at DESC);

@vercel
Copy link
Copy Markdown

vercel Bot commented Jun 1, 2026

@shadrach68 is attempting to deploy a commit to the Sudipta 's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave
Copy link
Copy Markdown

drips-wave Bot commented Jun 1, 2026

@shadrach68 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

@SudiptaPaul-31
Copy link
Copy Markdown
Owner

@shadrach68 resolve conflicts

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.

Add Transaction History for Wallet Activities

2 participants