Fixes fo ro/wo bridge (#1661)

This commit is contained in:
Branislav Kontur
2022-11-23 23:18:17 +01:00
committed by Bastian Köcher
parent 1688b493cd
commit 786db04bbc
4 changed files with 7 additions and 10 deletions
@@ -39,9 +39,6 @@ pub enum Error {
/// The response from the server could not be SCALE decoded.
#[error("Response parse failed: {0}")]
ResponseParseFailed(#[from] codec::Error),
/// The Substrate bridge pallet has not yet been initialized.
#[error("The Substrate bridge pallet has not been initialized yet.")]
UninitializedBridgePallet,
/// Account does not exist on the chain.
#[error("Account does not exist on the chain.")]
AccountDoesNotExist,
@@ -296,7 +296,7 @@ mod tests {
&self,
_hash: HashOf<TestChain>,
) -> Result<HeaderIdOf<TestChain>, Error> {
self.0.as_ref().map_err(|_| Error::UninitializedBridgePallet).cloned()
self.0.as_ref().map_err(|_| Error::BridgePalletIsNotInitialized).cloned()
}
}
@@ -338,7 +338,7 @@ mod tests {
async fn returns_lost_on_finalized_and_environment_error() {
assert_eq!(
watch_transaction_status::<_, TestChain, _>(
TestEnvironment(Err(Error::UninitializedBridgePallet)),
TestEnvironment(Err(Error::BridgePalletIsNotInitialized)),
Default::default(),
futures::stream::iter([TransactionStatus::Finalized(Default::default())])
)