--- a/client/rpc/src/lib.rs +++ b/client/rpc/src/lib.rs @@ -270,14 +270,6 @@ at: Option, ) -> Result>; - /// Returns the total amount locked by staking tokens. - #[method(name = "appPromotion_totalStakingLocked")] - fn total_staking_locked( - &self, - staker: CrossAccountId, - at: Option, - ) -> Result; - /// Returns the total amount of tokens pending withdrawal from staking. #[method(name = "appPromotion_pendingUnstake")] fn pending_unstake( @@ -594,7 +586,6 @@ .into_iter() .map(|(b, a)| (b, a.to_string())) .collect::>(), app_promotion_api); - pass_method!(total_staking_locked(staker: CrossAccountId) -> String => |v| v.to_string(), app_promotion_api); pass_method!(pending_unstake(staker: Option) -> String => |v| v.to_string(), app_promotion_api); pass_method!(pending_unstake_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> => |v| v --- a/primitives/app_promotion_rpc/src/lib.rs +++ b/primitives/app_promotion_rpc/src/lib.rs @@ -35,7 +35,6 @@ { fn total_staked(staker: Option) -> Result; fn total_staked_per_block(staker: CrossAccountId) -> Result>; - fn total_staking_locked(staker: CrossAccountId) -> Result; fn pending_unstake(staker: Option) -> Result; fn pending_unstake_per_block(staker: CrossAccountId) -> Result>; } --- a/runtime/common/runtime_apis.rs +++ b/runtime/common/runtime_apis.rs @@ -206,14 +206,6 @@ return Ok(>::cross_id_total_staked_per_block(staker)); } - fn total_staking_locked(staker: CrossAccountId) -> Result { - #[cfg(not(feature = "app-promotion"))] - return unsupported!(); - - #[cfg(feature = "app-promotion")] - return Ok(>::cross_id_locked_balance(staker)); - } - fn pending_unstake(staker: Option) -> Result { #[cfg(not(feature = "app-promotion"))] return unsupported!(); --- a/tests/src/interfaces/appPromotion/definitions.ts +++ b/tests/src/interfaces/appPromotion/definitions.ts @@ -22,9 +22,6 @@ const CROSS_ACCOUNT_ID_TYPE = 'PalletEvmAccountBasicCrossAccountIdRepr'; -const collectionParam = {name: 'collection', type: 'u32'}; -const tokenParam = {name: 'tokenId', type: 'u32'}; -const propertyKeysParam = {name: 'propertyKeys', type: 'Vec', isOptional: true}; const crossAccountParam = (name = 'account') => ({name, type: CROSS_ACCOUNT_ID_TYPE}); const atParam = {name: 'at', type: 'Hash', isOptional: true}; @@ -46,11 +43,6 @@ 'Returns the total amount of staked tokens per block when staked', [crossAccountParam('staker')], 'Vec<(u32, u128)>', - ), - totalStakingLocked: fun( - 'Return the total amount locked by staking tokens', - [crossAccountParam('staker')], - 'u128', ), pendingUnstake: fun( 'Returns the total amount of unstaked tokens', --- a/tests/src/interfaces/augment-api-rpc.ts +++ b/tests/src/interfaces/augment-api-rpc.ts @@ -52,10 +52,6 @@ * Returns the total amount of staked tokens per block when staked **/ totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>>>; - /** - * Return the total amount locked by staking tokens - **/ - totalStakingLocked: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable>; }; author: { /**