From bddfc8ff4cc81c66d3f3946b00b6a7b8072141b8 Mon Sep 17 00:00:00 2001 From: yrong Date: Tue, 7 Dec 2021 16:01:34 +0800 Subject: [PATCH] hot fix for currency --- node/service/src/chain_spec/bifrost.rs | 4 ++-- runtime/bifrost/src/constants.rs | 6 +++--- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/node/service/src/chain_spec/bifrost.rs b/node/service/src/chain_spec/bifrost.rs index afe4d89847..3505195f54 100644 --- a/node/service/src/chain_spec/bifrost.rs +++ b/node/service/src/chain_spec/bifrost.rs @@ -49,7 +49,7 @@ pub type ChainSpec = sc_service::GenericChainSpec u128 { - 1_000_000 * dollar(CurrencyId::Token(TokenSymbol::BNC)) + 1_000_000 * dollar(CurrencyId::Native(TokenSymbol::BNC)) } pub fn bifrost_genesis( @@ -326,7 +326,7 @@ fn bifrost_config_genesis(id: ParaId) -> GenesisConfig { assert_eq!( total_issuance, - 32_000_000 * dollar(CurrencyId::Token(TokenSymbol::BNC)), + 32_000_000 * dollar(CurrencyId::Native(TokenSymbol::BNC)), "total issuance must be equal to 320 million" ); diff --git a/runtime/bifrost/src/constants.rs b/runtime/bifrost/src/constants.rs index fef3b95ce6..bd0d1b03da 100644 --- a/runtime/bifrost/src/constants.rs +++ b/runtime/bifrost/src/constants.rs @@ -30,8 +30,8 @@ pub mod currency { pub use sp_runtime::Perbill; pub fn deposit(items: u32, bytes: u32) -> Balance { - items as Balance * 15 * cent(CurrencyId::Token(TokenSymbol::BNC)) + - (bytes as Balance) * 6 * cent(CurrencyId::Token(TokenSymbol::BNC)) + items as Balance * 15 * cent(CurrencyId::Native(TokenSymbol::BNC)) + + (bytes as Balance) * 6 * cent(CurrencyId::Native(TokenSymbol::BNC)) } pub struct KsmWeightToFee; @@ -70,7 +70,7 @@ pub mod currency { } fn base_tx_fee() -> Balance { - cent(CurrencyId::Token(TokenSymbol::BNC)) / 5 + cent(CurrencyId::Native(TokenSymbol::BNC)) / 5 } pub fn ksm_per_second() -> u128 {