difftreelog
remove: getTotalStakingLocked from RPC.
in: master
5 files changed
client/rpc/src/lib.rsdiffbeforeafterboth--- a/client/rpc/src/lib.rs
+++ b/client/rpc/src/lib.rs
@@ -270,14 +270,6 @@
at: Option<BlockHash>,
) -> Result<Vec<(BlockNumber, String)>>;
- /// Returns the total amount locked by staking tokens.
- #[method(name = "appPromotion_totalStakingLocked")]
- fn total_staking_locked(
- &self,
- staker: CrossAccountId,
- at: Option<BlockHash>,
- ) -> Result<String>;
-
/// 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::<Vec<_>>(), app_promotion_api);
- pass_method!(total_staking_locked(staker: CrossAccountId) -> String => |v| v.to_string(), app_promotion_api);
pass_method!(pending_unstake(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);
pass_method!(pending_unstake_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>
|v| v
primitives/app_promotion_rpc/src/lib.rsdiffbeforeafterboth--- 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<CrossAccountId>) -> Result<u128>;
fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
- fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;
fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;
fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;
}
runtime/common/runtime_apis.rsdiffbeforeafterboth--- a/runtime/common/runtime_apis.rs
+++ b/runtime/common/runtime_apis.rs
@@ -206,14 +206,6 @@
return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_total_staked_per_block(staker));
}
- fn total_staking_locked(staker: CrossAccountId) -> Result<u128, DispatchError> {
- #[cfg(not(feature = "app-promotion"))]
- return unsupported!();
-
- #[cfg(feature = "app-promotion")]
- return Ok(<pallet_app_promotion::Pallet<Runtime>>::cross_id_locked_balance(staker));
- }
-
fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128, DispatchError> {
#[cfg(not(feature = "app-promotion"))]
return unsupported!();
tests/src/interfaces/appPromotion/definitions.tsdiffbeforeafterboth--- 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<String>', 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',
tests/src/interfaces/augment-api-rpc.tsdiffbeforeafterboth52 * Returns the total amount of staked tokens per block when staked52 * Returns the total amount of staked tokens per block when staked53 **/53 **/54 totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;54 totalStakedPerBlock: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<Vec<ITuple<[u32, u128]>>>>;55 /**56 * Return the total amount locked by staking tokens57 **/58 totalStakingLocked: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;59 };55 };60 author: {56 author: {61 /**57 /**