Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions onchain/contracts/stellar_hunts/src/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use crate::{StellarHunts, StellarHuntsClient};
// Brings `Address::generate` into scope as an extension trait method.
use soroban_sdk::testutils::Address as _;
use soroban_sdk::testutils::Ledger;
use soroban_sdk::{Address, Bytes, Env};

// Renamed to `new_admin` so it does not collide with the destructured
Expand Down Expand Up @@ -179,6 +180,10 @@ fn test_require_admin_not_initialized() {
fn test_claim_level_completion_nft_retry_safe_on_nft_panic() {
let env = Env::default();
env.mock_all_auths();
// Set a non-zero ledger so the `last_attempt_ledger == current_ledger`
// check in `submit_answer` (which initialises `last_attempt_ledger` to 0)
// does not trigger an `AttemptTooSoon` panic.
env.ledger().set_sequence_number(100_000);

let admin = new_admin(&env);
let contract_id = env.register_contract(None, StellarHunts);
Expand Down