Skip to content

Escrow balance#330

Open
midenotch wants to merge 2 commits into
Kaizenode:mainfrom
midenotch:escrow-balance
Open

Escrow balance#330
midenotch wants to merge 2 commits into
Kaizenode:mainfrom
midenotch:escrow-balance

Conversation

@midenotch

Copy link
Copy Markdown

Closes #317

📝 Summary

  1. Updated lib/trustless-work.ts : Added helper.getMultipleEscrowBalance function to call the Trustless Work API's /helper/get-multiple-escrow-balance endpoint with an array of addresses
  2. Restored deleted API routes :
    • app/api/escrow/[contractId]/route.ts (GET)
    • app/api/escrow/complete/route.ts (POST)
    • app/api/escrow/dispute/route.ts (POST)
    • app/api/escrow/fund/route.ts (POST)
    • app/api/escrow/initialize/route.ts (POST)
    • app/api/escrow/resolve-dispute/route.ts (POST)
  3. Added new API route : app/api/helper/get-multiple-escrow-balance/route.ts (POST) to expose the new helper functionality
    Now, the frontend can call /api/helper/get-multiple-escrow-balance with an array of escrow contract addresses, and it will return the balances! The dispute resolution flow can use this to verify that distribution amounts match the on-chain balances before submitting!

🛠️ Issue

📖 Description

✅ Changes made

🖼️ Media (screenshots/videos)

📜 Additional Notes

@midenotch

Copy link
Copy Markdown
Author

Done, Close: #330

@diegoTech14

Copy link
Copy Markdown
Contributor

Hello @midenotch could you upload some images or video evidence of the correct functionality please?

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.

Show live escrow balances via GET /helper/get-multiple-escrow-balance

2 participants