Remove hard-coded indices from pallet-xcm tests (#4248)
# ISSUE
- Link to issue: https://github.com/paritytech/polkadot-sdk/issues/4237
# DESCRIPTION
Remove all ModuleError with hard-coded indices to pallet Error. For
example:
```rs
Err(DispatchError::Module(ModuleError {
index: 4,
error: [2, 0, 0, 0],
message: Some("Filtered")
}))
```
To
```rs
let expected_result = Err(crate::Error::<Test>::Filtered.into());
assert_eq!(result, expected_result);
```
# TEST OUTCOME
```
test result: ok. 74 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.02s
```
---------
Co-authored-by: Oliver Tale-Yazdi <[email protected]>
Please register or sign in to comment