From fa7ee60c4cce578b9d6de4d0085127feb8a3a481 Mon Sep 17 00:00:00 2001 From: Herry Ho <45537372+herryho@users.noreply.github.com> Date: Sat, 11 Sep 2021 14:30:03 +0800 Subject: [PATCH] V0.8.5 fix (#287) * Bump release v0.8.5 * Bump version * fix KUSD from Token to Stable type Co-authored-by: ron.yang --- node/service/src/chain_spec/asgard.rs | 1 - runtime/common/src/xcm_impl.rs | 8 ++++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/node/service/src/chain_spec/asgard.rs b/node/service/src/chain_spec/asgard.rs index 5d7aeaad9..93ca27b84 100644 --- a/node/service/src/chain_spec/asgard.rs +++ b/node/service/src/chain_spec/asgard.rs @@ -224,7 +224,6 @@ fn local_config_genesis(id: ParaId) -> GenesisConfig { (x.clone(), CurrencyId::Token(TokenSymbol::ETH), ENDOWMENT * 4_000_000), (x.clone(), CurrencyId::Token(TokenSymbol::KSM), ENDOWMENT * 4_000_000), (x.clone(), CurrencyId::Token(TokenSymbol::ASG), ENDOWMENT * 4_000_000), - (x.clone(), CurrencyId::Token(TokenSymbol::KUSD), ENDOWMENT * 4_000_000), (x.clone(), CurrencyId::Token(TokenSymbol::BNC), ENDOWMENT * 4_000_000), ( x.clone(), diff --git a/runtime/common/src/xcm_impl.rs b/runtime/common/src/xcm_impl.rs index 2fe8ffa2b..71d9c08b0 100644 --- a/runtime/common/src/xcm_impl.rs +++ b/runtime/common/src/xcm_impl.rs @@ -120,7 +120,7 @@ fn native_currency_location(id: CurrencyId, para_id: ParaId) -> MultiLocation { pub struct BifrostCurrencyIdConvert(sp_std::marker::PhantomData); impl> Convert> for BifrostCurrencyIdConvert { fn convert(id: CurrencyId) -> Option { - use CurrencyId::{Native, Token}; + use CurrencyId::{Native, Stable, Token}; match id { Token(TokenSymbol::KSM) => Some(X1(Parent)), Native(TokenSymbol::ASG) | Native(TokenSymbol::BNC) => @@ -131,7 +131,7 @@ impl> Convert> for BifrostCurre Parachain(parachains::karura::ID), GeneralKey(parachains::karura::KAR_KEY.to_vec()), )), - Token(TokenSymbol::KUSD) => Some(X3( + Stable(TokenSymbol::KUSD) => Some(X3( Parent, Parachain(parachains::karura::ID), GeneralKey(parachains::karura::KUSD_KEY.to_vec()), @@ -142,7 +142,7 @@ impl> Convert> for BifrostCurre } impl> Convert> for BifrostCurrencyIdConvert { fn convert(location: MultiLocation) -> Option { - use CurrencyId::{Native, Token}; + use CurrencyId::{Native, Stable, Token}; use TokenSymbol::*; match location { X1(Parent) => Some(Token(KSM)), @@ -164,7 +164,7 @@ impl> Convert> for BifrostCurre if key == parachains::karura::KAR_KEY.to_vec() { Some(Token(TokenSymbol::KAR)) } else if key == parachains::karura::KUSD_KEY.to_vec() { - Some(Token(TokenSymbol::KUSD)) + Some(Stable(TokenSymbol::KUSD)) } else { None }