difftreelog
remove: getTotalStakingLocked from RPC.
in: master
5 files changed
client/rpc/src/lib.rsdiffbeforeafterboth270 at: Option<BlockHash>,270 at: Option<BlockHash>,271 ) -> Result<Vec<(BlockNumber, String)>>;271 ) -> Result<Vec<(BlockNumber, String)>>;272273 /// Returns the total amount locked by staking tokens.274 #[method(name = "appPromotion_totalStakingLocked")]275 fn total_staking_locked(276 &self,277 staker: CrossAccountId,278 at: Option<BlockHash>,279 ) -> Result<String>;280272281 /// Returns the total amount of tokens pending withdrawal from staking.273 /// Returns the total amount of tokens pending withdrawal from staking.282 #[method(name = "appPromotion_pendingUnstake")]274 #[method(name = "appPromotion_pendingUnstake")]594 .into_iter()586 .into_iter()595 .map(|(b, a)| (b, a.to_string()))587 .map(|(b, a)| (b, a.to_string()))596 .collect::<Vec<_>>(), app_promotion_api);588 .collect::<Vec<_>>(), app_promotion_api);597 pass_method!(total_staking_locked(staker: CrossAccountId) -> String => |v| v.to_string(), app_promotion_api);598 pass_method!(pending_unstake(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);589 pass_method!(pending_unstake(staker: Option<CrossAccountId>) -> String => |v| v.to_string(), app_promotion_api);599 pass_method!(pending_unstake_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>590 pass_method!(pending_unstake_per_block(staker: CrossAccountId) -> Vec<(BlockNumber, String)> =>600 |v| v591 |v| vprimitives/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.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: {
/**