Skip to content
This repository was archived by the owner on Apr 25, 2026. It is now read-only.
This repository was archived by the owner on Apr 25, 2026. It is now read-only.

[BUG] process_schedule_delegator_unstake incorrectly includes nomination unstake requests in deposited asset validation #1048

@devpavan04

Description

@devpavan04

Overview

The process_schedule_delegator_unstake function in the multi-asset-delegation pallet contains a validation bug that prevents users from undelegating the full available amount of deposited assets when there are pending nomination unstake requests.

let pending_unstake_amount: BalanceOf<T> = metadata
    .delegator_unstake_requests
    .iter()
    .filter(|r| r.operator == operator && r.asset == asset) // Missing !r.is_nomination
    .fold(Zero::zero(), |acc, r| acc.saturating_add(r.amount));

This causes nomination unstake requests to be incorrectly included when calculating available deposited asset amounts.

Metadata

Metadata

Assignees

Labels

bug 🪲Something isn't working

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions