Skip to content

Commit

Permalink
dry_run always returns OK() (#4124)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcellorigotti authored Oct 19, 2023
1 parent eefe5a7 commit 9b0f4c6
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions api/lib/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ use cf_chains::{
CcmChannelMetadata, ForeignChain,
};
use cf_primitives::{AccountRole, Asset, BasisPoints, ChannelId};
use codec::Encode;
use futures::FutureExt;
use pallet_cf_governance::ExecutionMode;
use pallet_cf_validator::MAX_LENGTH_FOR_VANITY_NAME;
Expand Down Expand Up @@ -149,14 +148,11 @@ impl<
{
async fn dry_run(
&self,
call: RuntimeCall,
at: Option<state_chain_runtime::Hash>,
_call: RuntimeCall,
_at: Option<state_chain_runtime::Hash>,
) -> Result<Bytes> {
Ok(self
.base_rpc_client
.raw_rpc_client
.dry_run(Encode::encode(&call).into(), at)
.await?)
// TODO: PRO-917 fix dry run
Ok(Bytes::from(vec![]))
}
}

Expand All @@ -173,11 +169,6 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA
address: EthereumAddress,
executor: Option<EthereumAddress>,
) -> Result<H256> {
// Are we in a current auction phase
if self.is_auction_phase().await? {
bail!("We are currently in an auction phase. Please wait until the auction phase is over.");
}

let (tx_hash, ..) = self
.submit_signed_extrinsic(pallet_cf_funding::Call::redeem { amount, address, executor })
.await
Expand Down

0 comments on commit 9b0f4c6

Please sign in to comment.