diff --git a/contracts/docs/interchainqueries/howto/register_custom_kv_icq/src/contract.rs b/contracts/docs/interchainqueries/howto/register_custom_kv_icq/src/contract.rs index ccde5ed..44886ac 100644 --- a/contracts/docs/interchainqueries/howto/register_custom_kv_icq/src/contract.rs +++ b/contracts/docs/interchainqueries/howto/register_custom_kv_icq/src/contract.rs @@ -109,7 +109,11 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> NeutronResult { } pub fn query_account(deps: Deps, addr: String) -> NeutronResult { - Ok(to_json_binary(&REMOTE_ACCOUNTS.load(deps.storage, addr)?)?) + Ok(to_json_binary( + &REMOTE_ACCOUNTS + .may_load(deps.storage, addr) + .unwrap_or_default(), + )?) } #[entry_point] diff --git a/contracts/docs/interchainqueries/howto/register_kv_icq/src/contract.rs b/contracts/docs/interchainqueries/howto/register_kv_icq/src/contract.rs index ad48667..0734252 100644 --- a/contracts/docs/interchainqueries/howto/register_kv_icq/src/contract.rs +++ b/contracts/docs/interchainqueries/howto/register_kv_icq/src/contract.rs @@ -94,7 +94,11 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> NeutronResult { } pub fn query_balances(deps: Deps, addr: String) -> NeutronResult { - Ok(to_json_binary(&REMOTE_BALANCES.load(deps.storage, addr)?)?) + Ok(to_json_binary( + &REMOTE_BALANCES + .may_load(deps.storage, addr) + .unwrap_or_default(), + )?) } #[entry_point] diff --git a/contracts/docs/interchainqueries/howto/register_tx_icq/src/contract.rs b/contracts/docs/interchainqueries/howto/register_tx_icq/src/contract.rs index 64cf630..1675f33 100644 --- a/contracts/docs/interchainqueries/howto/register_tx_icq/src/contract.rs +++ b/contracts/docs/interchainqueries/howto/register_tx_icq/src/contract.rs @@ -102,7 +102,7 @@ pub fn query(deps: Deps, _env: Env, msg: QueryMsg) -> NeutronResult { pub fn query_undelegated_amount(deps: Deps, addr: String) -> NeutronResult { Ok(to_json_binary( &UNDELEGATED_AMOUNTS - .may_load(deps.storage, addr)? + .may_load(deps.storage, addr) .unwrap_or_default(), )?) }