Only return an error if the extrinsic failed. (#156)

This commit is contained in:
David Craven
2020-09-01 10:15:04 +00:00
committed by GitHub
parent 3ea9d3b8bb
commit e9c50e21d0
5 changed files with 76 additions and 35 deletions
+5 -2
View File
@@ -43,7 +43,10 @@ pub struct SudoCall<'a, T: Sudo> {
mod tests {
use super::*;
use crate::{
error::Error,
error::{
Error,
RuntimeError,
},
extrinsic::PairSigner,
frame::balances::TransferCall,
tests::{
@@ -68,7 +71,7 @@ mod tests {
let res = client.sudo_and_watch(&alice, &call).await;
assert!(
if let Err(Error::BadOrigin) = res {
if let Err(Error::Runtime(RuntimeError::BadOrigin)) = res {
true
} else {
false