Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix(xcm-fee-payment-runtime-api): finish renaming
  • Loading branch information
franciscoaguirre committed May 29, 2024
commit 188072b45cfb063b597f3a270259d1a2bc54cf82
2 changes: 1 addition & 1 deletion polkadot/xcm/xcm-fee-payment-runtime-api/src/dry_run.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ sp_api::decl_runtime_apis! {
/// Calls or XCMs might fail when executed, this doesn't mean the result of these calls will be an `Err`.
/// In those cases, there might still be a valid result, with the execution error inside it.
/// The only reasons why these calls might return an error are listed in the [`Error`] enum.
pub trait XcmDryRunApi<Call: Encode, Event: Decode, OriginCaller: Encode> {
pub trait DryRunApi<Call: Encode, Event: Decode, OriginCaller: Encode> {
/// Dry run call.
fn dry_run_call(origin: OriginCaller, call: Call) -> Result<CallDryRunEffects<Event>, Error>;

Expand Down
5 changes: 3 additions & 2 deletions polkadot/xcm/xcm-fee-payment-runtime-api/tests/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ use xcm_executor::{
};

use xcm_fee_payment_runtime_api::{
dry_run::{CallDryRunEffects, Error as XcmDryRunApiError, XcmDryRunApi, XcmDryRunEffects},
dry_run::{CallDryRunEffects, Error as XcmDryRunApiError, DryRunApi, XcmDryRunEffects},
fees::{Error as XcmPaymentApiError, XcmPaymentApi},
};

Expand Down Expand Up @@ -450,11 +450,12 @@ sp_api::mock_impl_runtime_apis! {
}
}

impl XcmDryRunApi<Block, RuntimeCall, RuntimeEvent, OriginCaller> for RuntimeApi {
impl DryRunApi<Block, RuntimeCall, RuntimeEvent, OriginCaller> for RuntimeApi {
fn dry_run_call(origin: OriginCaller, call: RuntimeCall) -> Result<CallDryRunEffects<RuntimeEvent>, XcmDryRunApiError> {
use xcm_executor::RecordXcm;
pallet_xcm::Pallet::<TestRuntime>::set_record_xcm(true);
let result = call.dispatch(origin.into());
pallet_xcm::Pallet::<TestRuntime>::set_record_xcm(false);
let local_xcm = pallet_xcm::Pallet::<TestRuntime>::recorded_xcm();
let forwarded_xcms = sent_xcm()
.into_iter()
Expand Down