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.rsdiffbeforeafterboth35 {35 {36 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;36 fn total_staked(staker: Option<CrossAccountId>) -> Result<u128>;37 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;37 fn total_staked_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;38 fn total_staking_locked(staker: CrossAccountId) -> Result<u128>;39 fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;38 fn pending_unstake(staker: Option<CrossAccountId>) -> Result<u128>;40 fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;39 fn pending_unstake_per_block(staker: CrossAccountId) -> Result<Vec<(BlockNumber, u128)>>;41 }40 }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.tsdiffbeforeafterboth--- 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<Vec<ITuple<[u32, u128]>>>>;
- /**
- * Return the total amount locked by staking tokens
- **/
- totalStakingLocked: AugmentedRpc<(staker: PalletEvmAccountBasicCrossAccountIdRepr | { Substrate: any } | { Ethereum: any } | string | Uint8Array, at?: Hash | string | Uint8Array) => Observable<u128>>;
};
author: {
/**