mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-11 21:49:26 +00:00
add swap-to-staked-sri feature
This commit is contained in:
@@ -797,12 +797,19 @@ pub mod pallet {
|
||||
total_required
|
||||
}
|
||||
|
||||
// TODO: make the increase_allocation public instead?
|
||||
pub fn deposit_stake(
|
||||
network: NetworkId,
|
||||
account: T::AccountId,
|
||||
amount: Amount,
|
||||
) -> DispatchResult {
|
||||
// TODO: make the increase_allocation public instead?
|
||||
// TODO: Should this call be part of the `increase_allocation` since we have to have it
|
||||
// before each call to it?
|
||||
Coins::<T>::transfer_internal(
|
||||
account,
|
||||
Self::account(),
|
||||
Balance { coin: Coin::Serai, amount },
|
||||
)?;
|
||||
Self::increase_allocation(network, account, amount, true)
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user