Skip to content

Commit

Permalink
fix: deposit saturation
Browse files Browse the repository at this point in the history
  • Loading branch information
chungquantin committed Jan 10, 2025
1 parent 1cdad44 commit 5d350b1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallets/nfts/src/features/approvals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -237,7 +237,7 @@ impl<T: Config<I>, I: 'static> Pallet<T, I> {
let deposit_required = T::CollectionApprovalDeposit::get();
let current_deposit =
maybe_approval.map(|(_, deposit)| deposit).unwrap_or_default();
T::Currency::reserve(&owner, deposit_required - current_deposit)?;
T::Currency::reserve(&owner, deposit_required.saturating_sub(current_deposit))?;
*maybe_approval = Some((deadline, deposit_required));
Ok(())
},
Expand Down

0 comments on commit 5d350b1

Please sign in to comment.