Skip to content

Commit

Permalink
Patch for 0.1.0-pre.alpha.3
Browse files Browse the repository at this point in the history
  • Loading branch information
rustyspottedcatt committed Feb 7, 2025
1 parent edf0803 commit c6ebbc1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions src/core/api/v1/staking.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,19 @@
use crate::core::staking::staking_module::StakingModule;
use ed25519_dalek::SigningKey;
use crate::core::canister::canister::{Canister, CanisterFunctionPayload};
use crate::core::consensus::model::ConsensusEngine;

pub fn stake_tokens(
canister: &mut Canister,
consensus_engine: &mut ConsensusEngine,
staking_module: &mut StakingModule,
signing_key: &SigningKey,
neuron_id: u64,
amount: u64,
) -> Result<String, String> {
canister.execute_function(CanisterFunctionPayload::Stake {
staking_module,
consensus_engine,
signing_key,
neuron_id,
amount,
Expand All @@ -19,13 +22,15 @@ pub fn stake_tokens(

pub fn unstake_tokens(
canister: &mut Canister,
consensus_engine: &mut ConsensusEngine,
staking_module: &mut StakingModule,
signing_key: &SigningKey,
neuron_id: u64,
amount: u64,
) -> Result<String, String> {
canister.execute_function(CanisterFunctionPayload::Unstake {
staking_module,
consensus_engine,
signing_key,
neuron_id,
amount,
Expand Down
2 changes: 1 addition & 1 deletion src/core/canister/canister.rs
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ impl Canister {
}
CanisterFunctionPayload::Stake {
staking_module,
consensus_engine
consensus_engine,
signing_key,
neuron_id,
amount,
Expand Down

0 comments on commit c6ebbc1

Please sign in to comment.