Skip to content

feat(frontend): implement parseListing parse helper in frontend/src/lib/contracts.ts - #296

Open
TS-mfon wants to merge 3 commits into
Ada-Girly881:testnet-implementationfrom
TS-mfon:testnet-implementation
Open

feat(frontend): implement parseListing parse helper in frontend/src/lib/contracts.ts#296
TS-mfon wants to merge 3 commits into
Ada-Girly881:testnet-implementationfrom
TS-mfon:testnet-implementation

Conversation

@TS-mfon

@TS-mfon TS-mfon commented Jul 26, 2026

Copy link
Copy Markdown

closes #137

Summary of Work Done

  1. Implemented parseListing Helper:

    • Added parseListing(rawData: Record<string, unknown>): MarketplaceListing in frontend/src/lib/contracts.ts to convert the raw scVal map returned by the marketplace contract into a typed MarketplaceListing interface object.
    • Handled BigInt conversions for id, bot_id, price, and listed_at fields using toBigInt().
  2. Refactored Marketplace Listing Query Helpers:

    • Updated getActiveListings() and getUserListings() in frontend/src/lib/contracts.ts to utilize the new parseListing helper function.
  3. Type Alias Support:

    • Added export type Listing = MarketplaceListing; in frontend/src/types/index.ts to support the Listing interface reference seamlessly.
  4. Testing & Verification:

    • Added unit test suite in frontend/src/lib/contracts.test.ts covering parseListing, parseUserProfile, and parseBotNFT.
    • Verified with TypeScript type check (npm run type-check) and Jest test runner (npm test), all passing.

@vercel

vercel Bot commented Jul 26, 2026

Copy link
Copy Markdown

@TS-mfon is attempting to deploy a commit to the Ada's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 26, 2026

Copy link
Copy Markdown

@TS-mfon 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

@Ada-Girly881

Copy link
Copy Markdown
Owner

Please resolve conflict

@Ada-Girly881

Copy link
Copy Markdown
Owner

Please fix the conflict

@TS-mfon

TS-mfon commented Jul 29, 2026

Copy link
Copy Markdown
Author

Owner
Sorry for the late response

…ation: resolve merge conflicts in contracts.ts and contracts.test.ts
@TS-mfon

TS-mfon commented Jul 29, 2026

Copy link
Copy Markdown
Author

done

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.

Implement parseListing parse helper in frontend/src/lib/contracts.ts

2 participants