diff --git a/api/lib/src/lib.rs b/api/lib/src/lib.rs index 2de42bed7eb..b2e0cad5944 100644 --- a/api/lib/src/lib.rs +++ b/api/lib/src/lib.rs @@ -41,7 +41,8 @@ pub use chainflip_engine::settings; pub use chainflip_node::chain_spec::use_chainflip_account_id_encoding; use chainflip_engine::state_chain_observer::client::{ - base_rpc_api::BaseRpcClient, DefaultRpcClient, StateChainClient, + base_rpc_api::BaseRpcClient, extrinsic_api::signed::UntilInBlock, DefaultRpcClient, + StateChainClient, }; use utilities::{clean_hex_address, task_scope::Scope}; @@ -159,7 +160,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA let (tx_hash, ..) = self .submit_signed_extrinsic(pallet_cf_funding::Call::redeem { amount, address, executor }) .await - .until_finalized() + .until_in_block() .await?; Ok(tx_hash) @@ -169,7 +170,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA let (tx_hash, ..) = self .submit_signed_extrinsic(pallet_cf_funding::Call::bind_redeem_address { address }) .await - .until_finalized() + .until_in_block() .await?; Ok(tx_hash) @@ -189,7 +190,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA let (tx_hash, ..) = self .submit_signed_extrinsic(call) .await - .until_finalized() + .until_in_block() .await .context("Could not register account role for account")?; Ok(tx_hash) @@ -212,7 +213,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA proof: [0; 1].to_vec(), }) .await - .until_finalized() + .until_in_block() .await?; Ok(tx_hash) @@ -222,7 +223,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA let (tx_hash, ..) = self .submit_signed_extrinsic(pallet_cf_funding::Call::stop_bidding {}) .await - .until_finalized() + .until_in_block() .await .context("Could not stop bidding")?; println!("Account stopped bidding, in tx {tx_hash:#x}."); @@ -233,7 +234,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA let (tx_hash, ..) = self .submit_signed_extrinsic(pallet_cf_funding::Call::start_bidding {}) .await - .until_finalized() + .until_in_block() .await .context("Could not start bidding")?; println!("Account started bidding at tx {tx_hash:#x}."); @@ -251,7 +252,7 @@ pub trait OperatorApi: SignedExtrinsicApi + RotateSessionKeysApi + AuctionPhaseA name: name.as_bytes().to_vec(), }) .await - .until_finalized() + .until_in_block() .await .context("Could not set vanity name for your account")?; println!("Vanity name set at tx {tx_hash:#x}."); @@ -267,7 +268,7 @@ pub trait GovernanceApi: SignedExtrinsicApi { call: Box::new(pallet_cf_validator::Call::force_rotation {}.into()), }) .await - .until_finalized() + .until_in_block() .await .context("Failed to submit rotation governance proposal")?; @@ -303,7 +304,7 @@ pub trait BrokerApi: SignedExtrinsicApi { channel_metadata, }) .await - .until_finalized() + .until_in_block() .await?; if let Some(state_chain_runtime::RuntimeEvent::Swapping( diff --git a/api/lib/src/lp.rs b/api/lib/src/lp.rs index a2116f5cd0c..5abd8158120 100644 --- a/api/lib/src/lp.rs +++ b/api/lib/src/lp.rs @@ -9,7 +9,7 @@ pub use cf_amm::{ use cf_chains::address::EncodedAddress; use cf_primitives::{Asset, AssetAmount, EgressId}; use chainflip_engine::state_chain_observer::client::{ - extrinsic_api::signed::{SignedExtrinsicApi, UntilFinalized}, + extrinsic_api::signed::{SignedExtrinsicApi, UntilInBlock}, StateChainClient, }; use pallet_cf_pools::{AssetAmounts, IncreaseOrDecrease, OrderId, RangeOrderSize}; @@ -105,7 +105,7 @@ pub trait LpApi: SignedExtrinsicApi { pallet_cf_lp::Call::register_liquidity_refund_address { address }, )) .await - .until_finalized() + .until_in_block() .await .context("Registration for Liquidity Refund Address failed.")?; Ok(tx_hash) @@ -117,7 +117,7 @@ pub trait LpApi: SignedExtrinsicApi { asset, }) .await - .until_finalized() + .until_in_block() .await?; Ok(events @@ -144,7 +144,7 @@ pub trait LpApi: SignedExtrinsicApi { destination_address, }) .await - .until_finalized() + .until_in_block() .await?; Ok(events @@ -178,7 +178,7 @@ pub trait LpApi: SignedExtrinsicApi { size, }) .await - .until_finalized() + .until_in_block() .await?; Ok(collect_range_order_returns(events)) @@ -202,7 +202,7 @@ pub trait LpApi: SignedExtrinsicApi { size, }) .await - .until_finalized() + .until_in_block() .await?; Ok(collect_range_order_returns(events)) @@ -228,7 +228,7 @@ pub trait LpApi: SignedExtrinsicApi { amount, }) .await - .until_finalized() + .until_in_block() .await?; Ok(collect_limit_order_returns(events)) @@ -252,7 +252,7 @@ pub trait LpApi: SignedExtrinsicApi { sell_amount, }) .await - .until_finalized() + .until_in_block() .await?; Ok(collect_limit_order_returns(events))