From 49b6ec88e5963ef1dd27a6a7e6bc2c4256648bd8 Mon Sep 17 00:00:00 2001 From: Mauro Lacy Date: Wed, 18 Sep 2024 09:53:28 +0200 Subject: [PATCH] Fix / adjust staking tests --- contracts/btc-staking/src/contract.rs | 5 ++++- contracts/btc-staking/src/queries.rs | 2 +- contracts/btc-staking/src/staking.rs | 3 ++- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/contracts/btc-staking/src/contract.rs b/contracts/btc-staking/src/contract.rs index a9abe58c..15fc49a1 100644 --- a/contracts/btc-staking/src/contract.rs +++ b/contracts/btc-staking/src/contract.rs @@ -148,7 +148,10 @@ pub(crate) mod tests { }; use cw_controllers::AdminResponse; use hex::ToHex; - use test_utils::{get_btc_delegation, get_finality_provider}; + use k256::schnorr::{Signature, SigningKey}; + use test_utils::{ + get_btc_del_unbonding_sig_bytes, get_btc_delegation, get_finality_provider, get_fp_sk_bytes, + }; pub(crate) const CREATOR: &str = "creator"; pub(crate) const INIT_ADMIN: &str = "initial_admin"; diff --git a/contracts/btc-staking/src/queries.rs b/contracts/btc-staking/src/queries.rs index 1160ee6f..279cd2b9 100644 --- a/contracts/btc-staking/src/queries.rs +++ b/contracts/btc-staking/src/queries.rs @@ -183,7 +183,7 @@ mod tests { use cosmwasm_std::testing::message_info; use cosmwasm_std::testing::{mock_dependencies, mock_env}; use cosmwasm_std::StdError::NotFound; - use cosmwasm_std::{from_json, Binary, Env, Storage}; + use cosmwasm_std::{from_json, Env, Storage}; use babylon_apis::btc_staking_api::{FinalityProvider, UnbondedBtcDelegation}; diff --git a/contracts/btc-staking/src/staking.rs b/contracts/btc-staking/src/staking.rs index a22d6ad7..0a6267aa 100644 --- a/contracts/btc-staking/src/staking.rs +++ b/contracts/btc-staking/src/staking.rs @@ -411,7 +411,8 @@ pub(crate) mod tests { use cosmwasm_std::testing::{message_info, mock_dependencies, mock_env}; use crate::contract::tests::{ - create_new_finality_provider, get_active_btc_delegation, get_params, CREATOR, INIT_ADMIN, + create_new_finality_provider, create_new_fp_sk, get_active_btc_delegation, + get_btc_del_unbonding_sig, get_derived_btc_delegation, get_params, CREATOR, INIT_ADMIN, }; use crate::contract::{execute, instantiate}; use crate::msg::{ExecuteMsg, InstantiateMsg};