Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Treasury support KTON Proposal #306

Merged
merged 19 commits into from
Mar 3, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 4 additions & 9 deletions frame/treasury/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -371,25 +371,20 @@ impl<T: Trait> Module<T> {
return true;
}

// no spent no burn
if p.ring_value == RingBalance::<T>::from(0) {
miss_any_ring = true;
}

if p.kton_value == KtonBalance::<T>::from(0) {
miss_any_kton = true;
}

hackfisher marked this conversation as resolved.
Show resolved Hide resolved
if p.ring_value > RingBalance::<T>::from(0) {
budget_remaining_ring -= p.ring_value;
hackfisher marked this conversation as resolved.
Show resolved Hide resolved
let _ = T::RingCurrency::unreserve(&p.proposer, p.ring_bond);
imbalance_ring.subsume(T::RingCurrency::deposit_creating(&p.beneficiary, p.ring_value));
} else {
miss_any_ring = true;
}

if p.kton_value > KtonBalance::<T>::from(0) {
hackfisher marked this conversation as resolved.
Show resolved Hide resolved
budget_remaining_kton -= p.kton_value;
let _ = T::KtonCurrency::unreserve(&p.proposer, p.kton_bond);
imbalance_kton.subsume(T::KtonCurrency::deposit_creating(&p.beneficiary, p.kton_value));
} else {
miss_any_kton = true;
hackfisher marked this conversation as resolved.
Show resolved Hide resolved
}

<Proposals<T>>::remove(index);
Expand Down