Skip to content

Commit

Permalink
remove rpc vesting method
Browse files Browse the repository at this point in the history
  • Loading branch information
devdanco committed Sep 4, 2023
1 parent 633697c commit da09507
Show file tree
Hide file tree
Showing 7 changed files with 0 additions and 241 deletions.
36 changes: 0 additions & 36 deletions frame/vesting-mangata/rpc/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions frame/vesting-mangata/rpc/README.md

This file was deleted.

30 changes: 0 additions & 30 deletions frame/vesting-mangata/rpc/runtime-api/Cargo.toml

This file was deleted.

3 changes: 0 additions & 3 deletions frame/vesting-mangata/rpc/runtime-api/README.md

This file was deleted.

39 changes: 0 additions & 39 deletions frame/vesting-mangata/rpc/runtime-api/src/lib.rs

This file was deleted.

114 changes: 0 additions & 114 deletions frame/vesting-mangata/rpc/src/lib.rs

This file was deleted.

16 changes: 0 additions & 16 deletions frame/vesting-mangata/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,22 +435,6 @@ pub mod pallet {
}

impl<T: Config> Pallet<T> {
pub fn get_vesting_locked_at(
who: &T::AccountId,
token_id: TokenIdOf<T>,
at_block_number: Option<T::BlockNumber>,
) -> Result<Vec<BalanceOf<T>>, DispatchError> {
let at_block_number = at_block_number.unwrap_or(<frame_system::Pallet<T>>::block_number());
Ok(Self::vesting(&who, token_id)
.ok_or(Error::<T>::NotVesting)?
.to_vec()
.into_iter()
.map(|x| {
BalanceOf::<T>::from(x.locked_at::<T::BlockNumberToBalance>(at_block_number))
})
.collect::<Vec<BalanceOf<T>>>())
}

// Create a new `VestingInfo`, based off of two other `VestingInfo`s.
// NOTE: We assume both schedules have had funds unlocked up through the current block.
fn merge_vesting_info(
Expand Down

0 comments on commit da09507

Please sign in to comment.