Skip to content
This repository was archived by the owner on Jun 30, 2023. It is now read-only.

Commit

Permalink
Make deposit and withdraw no pays if success (#79)
Browse files Browse the repository at this point in the history
Co-authored-by: icodezjb <[email protected]>
  • Loading branch information
icodezjb and icodezjb authored Feb 18, 2022
1 parent 3c17f95 commit 0ff6891
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion runtime/sherpax/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ pub const VERSION: RuntimeVersion = RuntimeVersion {
// `spec_version`, and `authoring_version` are the same between Wasm and native.
// This value is set to 100 to notify Polkadot-JS App (https://polkadot.js.org/apps) to use
// the compatible custom types.
spec_version: 28,
spec_version: 29,
impl_version: 1,
apis: RUNTIME_API_VERSIONS,
transaction_version: 2,
Expand Down
8 changes: 4 additions & 4 deletions xpallets/assets-bridge/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ pub mod pallet {
origin: OriginFor<T>,
asset_id: T::AssetId,
amount: T::Balance,
) -> DispatchResult {
) -> DispatchResultWithPostInfo {
let who = ensure_signed(origin)?;
ensure!(!Self::is_in_emergency(asset_id), Error::<T>::InEmergency);
ensure!(!amount.is_zero(), Error::<T>::ZeroBalance);
Expand All @@ -310,7 +310,7 @@ pub mod pallet {
erc20,
));

Ok(())
Ok(Pays::No.into())
}

/// Withdraw from evm erc20 contracts into substrate assets
Expand All @@ -324,7 +324,7 @@ pub mod pallet {
origin: OriginFor<T>,
asset_id: T::AssetId,
amount: T::Balance,
) -> DispatchResult {
) -> DispatchResultWithPostInfo {
let who = ensure_signed(origin)?;
ensure!(!Self::is_in_emergency(asset_id), Error::<T>::InEmergency);
ensure!(!amount.is_zero(), Error::<T>::ZeroBalance);
Expand All @@ -350,7 +350,7 @@ pub mod pallet {
erc20,
));

Ok(())
Ok(Pays::No.into())
}

/// Teleport native currency between substrate account and evm address
Expand Down

0 comments on commit 0ff6891

Please sign in to comment.