Skip to content

Commit

Permalink
avoid add base cost twice (#2611)
Browse files Browse the repository at this point in the history
  • Loading branch information
xlc authored Sep 11, 2023
1 parent 8853822 commit b75342d
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions runtime/common/src/precompile/liquid_crowdloan.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,14 +124,11 @@ where
let read_account = InputPricer::<Runtime>::read_accounts(1);
let weight = <Runtime as module_liquid_crowdloan::Config>::WeightInfo::redeem();

Self::BASE_COST
.saturating_add(read_account)
.saturating_add(WeightToGas::convert(weight))
read_account.saturating_add(WeightToGas::convert(weight))
}
Action::GetRedeemCurrency => {
let weight = <Runtime as frame_system::Config>::DbWeight::get().reads(1);

Self::BASE_COST.saturating_add(WeightToGas::convert(weight))
WeightToGas::convert(weight)
}
};
Ok(Self::BASE_COST.saturating_add(cost))
Expand Down

0 comments on commit b75342d

Please sign in to comment.