Skip to content

Commit

Permalink
chore: update common
Browse files Browse the repository at this point in the history
  • Loading branch information
gluax committed Aug 19, 2024
1 parent 2092f63 commit d7b24ed
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ k256 = { version = "0.13", default-features = false, features = ["ecdsa"] }
libfuzzer-sys = "0.4"
rand = "0.8"
schemars = { version = "0.8", features = ["semver"] }
seda-common = { git = "https://github.com/sedaprotocol/seda-common-rs.git", branch = "main" }
seda-common = { git = "https://github.com/sedaprotocol/seda-common-rs.git", branch = "fix/u128-deser-errors" }
# leaving this in to make local development easier
# seda-common = { path = "../seda-common-rs" }
semver = { version = "1.0", features = ["serde"] }
Expand Down
6 changes: 3 additions & 3 deletions contract/src/state.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use cosmwasm_std::{StdResult, Storage};
use cosmwasm_std::{StdResult, Storage, Uint128};
use cw_storage_plus::{Item, Map};

use crate::types::PublicKey;
Expand All @@ -17,8 +17,8 @@ pub fn get_seq(store: &dyn Storage, public_key: &PublicKey) -> StdResult<u128> {
ACCOUNT_SEQ.may_load(store, public_key).map(|x| x.unwrap_or_default())
}

pub fn inc_get_seq(store: &mut dyn Storage, public_key: &PublicKey) -> StdResult<u128> {
pub fn inc_get_seq(store: &mut dyn Storage, public_key: &PublicKey) -> StdResult<Uint128> {
let seq = ACCOUNT_SEQ.may_load(store, public_key)?.unwrap_or_default();
ACCOUNT_SEQ.save(store, public_key, &(seq + 1))?;
Ok(seq)
Ok(seq.into())
}

0 comments on commit d7b24ed

Please sign in to comment.