Skip to content

Commit

Permalink
support prefunding _before_ renewal window...note this has consequenc…
Browse files Browse the repository at this point in the history
…es...
  • Loading branch information
jason-c-child committed Oct 9, 2024
1 parent d91a67b commit 486e4f4
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 20 deletions.
20 changes: 10 additions & 10 deletions 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 @@ -3,7 +3,7 @@ members = ["packages/*", "contracts/*"]
resolver = "2"

[workspace.package]
version = "2.3.0"
version = "2.3.1"
edition = "2021"
homepage = "https://stargaze.zone"
repository = "https://github.com/public-awesome/names"
Expand Down
2 changes: 1 addition & 1 deletion contracts/marketplace/schema/name-marketplace.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "name-marketplace",
"contract_version": "2.3.0",
"contract_version": "2.3.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
9 changes: 6 additions & 3 deletions contracts/marketplace/src/query.rs
Original file line number Diff line number Diff line change
Expand Up @@ -206,9 +206,12 @@ pub fn query_ask_renew_price(

let ask_renew_start_time = ask.renewal_time.seconds() - sudo_params.renew_window;

if current_time.seconds() < ask_renew_start_time {
return Ok((None, None));
}
// NOTE: disabling to support prefunding before renewal window
// this may be re-enabled if the prefunding logic needs
// to be supported again
// if current_time.seconds() < ask_renew_start_time {
// return Ok((None, None));
// }

let name_minter = NAME_MINTER.load(deps.storage)?;
let name_minter_params = deps
Expand Down
2 changes: 1 addition & 1 deletion contracts/name-minter/schema/name-minter.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "name-minter",
"contract_version": "2.3.0",
"contract_version": "2.3.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down
6 changes: 3 additions & 3 deletions contracts/name-minter/src/integration_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1145,9 +1145,9 @@ mod query {
},
);
assert!(result.is_ok());

let (renewal_price, _renewal_bid) = result.unwrap();
assert!(renewal_price.is_none());
// NOTE: disabling to support prefunding before renewal window
// let (renewal_price, _renewal_bid) = result.unwrap();
// assert!(renewal_price.is_none());

update_block_time(&mut app, SECONDS_PER_YEAR - (60 * 60 * 24 * 30));

Expand Down
2 changes: 1 addition & 1 deletion contracts/sg721-name/schema/sg721-name.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"contract_name": "sg721-name",
"contract_version": "2.3.0",
"contract_version": "2.3.1",
"idl_version": "1.0.0",
"instantiate": {
"$schema": "http://json-schema.org/draft-07/schema#",
Expand Down

0 comments on commit 486e4f4

Please sign in to comment.