Skip to content

feat: integrate cancel pool functionality#65

Merged
martinvibes merged 6 commits intoWeb3Novalabs:mainfrom
zintarh:cancel_btn
Jul 29, 2025
Merged

feat: integrate cancel pool functionality#65
martinvibes merged 6 commits intoWeb3Novalabs:mainfrom
zintarh:cancel_btn

Conversation

@zintarh
Copy link
Contributor

@zintarh zintarh commented Jul 10, 2025

🔴 Integrate Cancel Pool Functionality

📌 Overview

This PR adds full support for canceling an active pool, enabling users (typically pool creators ) to halt pool participation and trigger related state updates. It ensures proper on-chain interaction, user feedback, and frontend UI synchronization.

closes #51

✅ Features Implemented

  • Cancel Pool Handler:
    Added logic to invoke the smart contract method that cancels an active pool, ensuring only eligible users can perform the action.

  • Action State Management:
    Introduced cancelStatus state with "pending" | "success" | "error" values to track the lifecycle of the cancellation process, ensuring UI reflects current status.

  • Smart Contract Interaction:
    Connected to the contract’s cancel_pool() and integrated appropriate transaction handling (loading, confirmation, error fallback).

  • UI Feedback:

    • Displayed real-time status via button states and toast notifications.
  • Access Control:
    Ensured only the pool creator or authorized entity can trigger cancellation.


🧪 Test Scenarios Covered

  • Successfully cancel an active pool
  • Handle cancellation attempt by unauthorized user
  • Manage UI state across pending, success, and error conditions
  • Ensure pool status updates correctly across the UI

🗂 Files Affected

  • cancelPool.ts / hook or helper logic
  • Component triggering pool cancel action
  • State management (cancelStatus, toast, UI updates)

@martinvibes
Copy link
Contributor

martinvibes commented Jul 17, 2025

@zintarh pls resolve conflict

@martinvibes
Copy link
Contributor

@zintarh pls fix conflict so i can merge

@zintarh
Copy link
Contributor Author

zintarh commented Jul 24, 2025

@martinvibes conflicts resolved

@martinvibes
Copy link
Contributor

@zintarh your build is failing, pls fix

@martinvibes
Copy link
Contributor

@zintarh any update on this

Copy link
Contributor

@martinvibes martinvibes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@martinvibes martinvibes merged commit 7c51c1b into Web3Novalabs:main Jul 29, 2025
1 check passed
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.

[Frontend] Integrate Pool Cancellation Function (cancel_pool)

3 participants