From b4da97022def2c178b85853a6d915a37790cb13b Mon Sep 17 00:00:00 2001 From: k4m4 Date: Thu, 18 Apr 2024 19:12:30 +0300 Subject: [PATCH] Revert "xrpl-multisig-prover: create get_next_multisig_session_id query function" This reverts commit 42bf6b3f7a21c445f34cd948f0829308708f4801. --- contracts/multisig-prover/src/test/mocks/multisig.rs | 1 - contracts/multisig/src/contract.rs | 1 - contracts/multisig/src/contract/query.rs | 6 ------ contracts/multisig/src/msg.rs | 3 --- 4 files changed, 11 deletions(-) diff --git a/contracts/multisig-prover/src/test/mocks/multisig.rs b/contracts/multisig-prover/src/test/mocks/multisig.rs index 4ed74abea..ff1a89f35 100644 --- a/contracts/multisig-prover/src/test/mocks/multisig.rs +++ b/contracts/multisig-prover/src/test/mocks/multisig.rs @@ -89,7 +89,6 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { worker_address, key_type, )), - QueryMsg::GetNextSessionId => unimplemented!(), } } diff --git a/contracts/multisig/src/contract.rs b/contracts/multisig/src/contract.rs index 0a282d579..c343de0d7 100644 --- a/contracts/multisig/src/contract.rs +++ b/contracts/multisig/src/contract.rs @@ -103,7 +103,6 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> StdResult { deps.api.addr_validate(&worker_address)?, key_type, )?), - QueryMsg::GetNextSessionId => to_binary(&query::get_next_session_id(deps)?), } } diff --git a/contracts/multisig/src/contract/query.rs b/contracts/multisig/src/contract/query.rs index 34fa38429..33c66d7cf 100644 --- a/contracts/multisig/src/contract/query.rs +++ b/contracts/multisig/src/contract/query.rs @@ -1,5 +1,3 @@ -use std::ops::Add; - use crate::{ key::{KeyType, PublicKey}, state::{load_pub_key, load_session_signatures}, @@ -36,7 +34,3 @@ pub fn get_public_key(deps: Deps, worker: Addr, key_type: KeyType) -> StdResult< let raw = load_pub_key(deps.storage, worker, key_type)?; Ok(PublicKey::try_from((key_type, raw)).expect("could not decode pub key")) } - -pub fn get_next_session_id(deps: Deps) -> StdResult { - Ok(SIGNING_SESSION_COUNTER.load(deps.storage)?.add(Uint64::one())) -} diff --git a/contracts/multisig/src/msg.rs b/contracts/multisig/src/msg.rs index c290a8518..ba4062465 100644 --- a/contracts/multisig/src/msg.rs +++ b/contracts/multisig/src/msg.rs @@ -67,9 +67,6 @@ pub enum QueryMsg { worker_address: String, key_type: KeyType, }, - - #[returns(Uint64)] - GetNextSessionId, } #[cw_serde]