From a2e77bd7855ee02cda67d1a6d0a77d292229a797 Mon Sep 17 00:00:00 2001 From: Peter White Date: Sat, 24 Feb 2024 10:59:28 -0700 Subject: [PATCH] fix: remove redundant UNIT definitions --- runtime/src/contracts_config.rs | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/runtime/src/contracts_config.rs b/runtime/src/contracts_config.rs index 7e40bbcc..f580cf62 100644 --- a/runtime/src/contracts_config.rs +++ b/runtime/src/contracts_config.rs @@ -1,6 +1,6 @@ use crate::{ - Balance, Balances, BalancesCall, Perbill, Runtime, RuntimeCall, - RuntimeEvent, RuntimeHoldReason, Timestamp, + Balance, Balances, BalancesCall, MILLIUNIT, Perbill, Runtime, RuntimeCall, + RuntimeEvent, RuntimeHoldReason, Timestamp, UNIT }; use frame_support::{ parameter_types, @@ -16,10 +16,6 @@ impl frame_support::traits::Contains for AllowBalancesCall { } } -// Unit = the base number of indivisible units for balances -const UNIT: Balance = 1_000_000_000_000; -const MILLIUNIT: Balance = 1_000_000_000; - const fn deposit(items: u32, bytes: u32) -> Balance { (items as Balance * UNIT + (bytes as Balance) * (5 * MILLIUNIT / 100)) / 10 }