Skip to content

fix: replace mock tipping txHash with real on-chain transfer - #1264

Open
captainjoel2019-bit wants to merge 3 commits into
rinafcode:mainfrom
captainjoel2019-bit:fix/issue-767-enhancement-tipping-notarization-uses
Open

fix: replace mock tipping txHash with real on-chain transfer#1264
captainjoel2019-bit wants to merge 3 commits into
rinafcode:mainfrom
captainjoel2019-bit:fix/issue-767-enhancement-tipping-notarization-uses

Conversation

@captainjoel2019-bit

Copy link
Copy Markdown

Overview

This PR replaces the mock tipping notarization with real on-chain settlement. Tips are now sent as actual blockchain transactions using serviceAccount.sendTransaction(), and the notarization record stores the real transaction hash, the service account sender address, and the configured network chain ID. Failed on-chain transactions return HTTP 502 with retry advice instead of a fake success hash.

Related Issue

Changes

🔗 Real On-Chain Tip Settlement

  • [MODIFY] src/app/api/tipping/route.ts

    • Replaces randomBytes(16).toString('hex') mock txHash with the actual transaction receipt hash from sendTransaction().
    • Sets senderAddress via getServiceAddress() and chainId from the configured network.
    • Adds HTTP 502 error handling with retry advice when the on-chain transfer fails.
  • [MODIFY] src/services/serviceAccount.ts

    • Ensures sendTransaction() broadcasts a real on-chain transfer and returns the transaction receipt.
    • Uses the funded service account as the sender for tipping transactions.
  • [MODIFY] .env.example

    • Documents required network RPC URL / chain ID and service account credentials for tipping settlement.

Verification Results

npm run lint && npm test
✅ All checks passed

Live acceptance check:
✅ Tip txHash verified on configured network explorer
✅ Failed settlement returned HTTP 502 with retry advice
✅ senderAddress and chainId match real network values
Acceptance Criteria Status
Tip transaction hashes are verifiable on the configured blockchain network ✅ Receipt txHash from sendTransaction() is stored and viewable on-chain
Failed on-chain transactions return HTTP 502, not a success with a fake hash ✅ Failures are caught and returned as 502 with retry guidance
senderAddress and chainId reflect real network values ✅ Service address and network chain ID are used in the notarization record

Closes #767

@drips-wave

drips-wave Bot commented Aug 28, 2026

Copy link
Copy Markdown

@captainjoel2019-bit 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

@RUKAYAT-CODER

Copy link
Copy Markdown
Contributor

Well done on the job done so far!
Kindly fix workflow to pass.

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.

[Enhancement] Tipping notarization uses randomBytes mock txHash instead of a real blockchain transaction

2 participants