Skip to content

Commit

Permalink
V0.8.5 fix (#287)
Browse files Browse the repository at this point in the history
* Bump release v0.8.5

* Bump version

* fix KUSD from Token to Stable type

Co-authored-by: ron.yang <[email protected]>
  • Loading branch information
herryho and yrong authored Sep 11, 2021
1 parent 62e2059 commit fa7ee60
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 0 additions & 1 deletion node/service/src/chain_spec/asgard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down
8 changes: 4 additions & 4 deletions runtime/common/src/xcm_impl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ fn native_currency_location(id: CurrencyId, para_id: ParaId) -> MultiLocation {
pub struct BifrostCurrencyIdConvert<T>(sp_std::marker::PhantomData<T>);
impl<T: Get<ParaId>> Convert<CurrencyId, Option<MultiLocation>> for BifrostCurrencyIdConvert<T> {
fn convert(id: CurrencyId) -> Option<MultiLocation> {
use CurrencyId::{Native, Token};
use CurrencyId::{Native, Stable, Token};
match id {
Token(TokenSymbol::KSM) => Some(X1(Parent)),
Native(TokenSymbol::ASG) | Native(TokenSymbol::BNC) =>
Expand All @@ -131,7 +131,7 @@ impl<T: Get<ParaId>> Convert<CurrencyId, Option<MultiLocation>> 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()),
Expand All @@ -142,7 +142,7 @@ impl<T: Get<ParaId>> Convert<CurrencyId, Option<MultiLocation>> for BifrostCurre
}
impl<T: Get<ParaId>> Convert<MultiLocation, Option<CurrencyId>> for BifrostCurrencyIdConvert<T> {
fn convert(location: MultiLocation) -> Option<CurrencyId> {
use CurrencyId::{Native, Token};
use CurrencyId::{Native, Stable, Token};
use TokenSymbol::*;
match location {
X1(Parent) => Some(Token(KSM)),
Expand All @@ -164,7 +164,7 @@ impl<T: Get<ParaId>> Convert<MultiLocation, Option<CurrencyId>> 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
}
Expand Down

0 comments on commit fa7ee60

Please sign in to comment.