Unverified Commit 90640249 authored by Shawn Tabrizi's avatar Shawn Tabrizi Committed by GitHub
Browse files

use `WEIGHT_PER_SECOND` (#4077)

parent 9c05f975
Pipeline #162039 failed with stages
in 33 minutes and 28 seconds
......@@ -156,7 +156,7 @@ impl<T: Get<(MultiLocation, u128)>, R: TakeRevenue> WeightTrader
fn refund_weight(&mut self, weight: Weight) -> Option<MultiAsset> {
let (id, units_per_second) = T::get();
let weight = weight.min(self.0);
let amount = units_per_second * (weight as u128) / 1_000_000_000_000u128;
let amount = units_per_second * (weight as u128) / (WEIGHT_PER_SECOND as u128);
self.0 -= weight;
self.1 = self.1.saturating_sub(amount);
if amount > 0 {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment