From 3a9596f19a5eee6d92ed6800c10c7b32c9e86542 Mon Sep 17 00:00:00 2001 From: NingBo Wang <2536935847@qq.com> Date: Fri, 7 Apr 2023 22:23:51 +0800 Subject: [PATCH] Fix astar FailedToTransactAsset error (#952) --- runtime/bifrost-polkadot/src/xcm_config.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/runtime/bifrost-polkadot/src/xcm_config.rs b/runtime/bifrost-polkadot/src/xcm_config.rs index aaa5c5b32..92f347138 100644 --- a/runtime/bifrost-polkadot/src/xcm_config.rs +++ b/runtime/bifrost-polkadot/src/xcm_config.rs @@ -151,7 +151,19 @@ impl> Convert> for BifrostCurre if ((id == parachains::moonbeam::ID) && (index == parachains::moonbeam::PALLET_ID)) => Some(Token2(GLMR_TOKEN_ID)), - + X2(Parachain(id), GeneralKey { data, length }) + if (id == u32::from(ParachainInfo::parachain_id())) => + { + let key = &data[..length as usize]; + if let Ok(currency_id) = CurrencyId::decode(&mut &key[..]) { + match currency_id { + Native(BNC) => Some(currency_id), + _ => None, + } + } else { + None + } + }, _ => None, }, MultiLocation { parents, interior } if parents == 0 => match interior {