Make RelayedFrom typesafe (#3617)

* Corrent type

* Fix build

* Fixes

* Fixes

* Formatting
This commit is contained in:
Gavin Wood
2021-08-11 12:40:10 +02:00
committed by GitHub
parent c40f080394
commit 0bb5434e08
8 changed files with 94 additions and 84 deletions
+6 -5
View File
@@ -17,10 +17,8 @@
use crate::mock::*;
use frame_support::{assert_noop, assert_ok, traits::Currency};
use polkadot_parachain::primitives::{AccountIdConversion, Id as ParaId};
use xcm::{
opaque::v1::prelude::*,
v1::{Junction, Xcm},
};
use std::convert::TryInto;
use xcm::v1::prelude::*;
const ALICE: AccountId = AccountId::new([0u8; 32]);
const BOB: AccountId = AccountId::new([1u8; 32]);
@@ -55,7 +53,10 @@ fn send_works() {
sent_xcm(),
vec![(
Here.into(),
RelayedFrom { who: sender.clone(), message: Box::new(message.clone()) }
RelayedFrom {
who: sender.clone().try_into().unwrap(),
message: Box::new(message.clone()),
}
)]
);
assert_eq!(