Skip to content

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

Description

@RUKAYAT-CODER

Overview

src/app/api/tipping/route.ts generates the transaction hash using randomBytes(16).toString('hex') with senderAddress: 'anonymous' and chainId: 'server'. The notarization proof is a hash of fabricated data, not a verifiable on-chain event. Anyone who verifies the txHash on-chain will find nothing.

Specifications

Features:

  • Tips are settled as real on-chain transactions using ethers.js
  • The txHash recorded in the notarization record is verifiable on the target network

Tasks:

  • Use src/services/serviceAccount.ts sendTransaction() to create a real on-chain transfer
  • Replace mock fields with real values: senderAddress = await getServiceAddress(), chainId = network.chainId
  • Store the real txHash from the transaction receipt
  • Add error handling for failed on-chain transactions (return 502 with retry advice)

Impacted Files:

  • src/app/api/tipping/route.ts
  • src/services/serviceAccount.ts
  • .env.example

Acceptance Criteria

  • Tip transaction hashes are verifiable on the configured blockchain network
  • Failed on-chain transactions return HTTP 502, not a success with a fake hash
  • senderAddress and chainId reflect real network values

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions