mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 19:51:05 +00:00
Only return an error if the extrinsic failed. (#156)
This commit is contained in:
+5
-2
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user