Skip to content

Commit a26befa

Browse files
committed
Remove usage of BankQuery::AllBalances from reflect test
1 parent 960fc2c commit a26befa

File tree

3 files changed

+5
-51
lines changed

3 files changed

+5
-51
lines changed

contracts/reflect/schema/raw/query.json

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -161,29 +161,6 @@
161161
},
162162
"additionalProperties": false
163163
},
164-
{
165-
"description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.",
166-
"deprecated": true,
167-
"type": "object",
168-
"required": [
169-
"all_balances"
170-
],
171-
"properties": {
172-
"all_balances": {
173-
"type": "object",
174-
"required": [
175-
"address"
176-
],
177-
"properties": {
178-
"address": {
179-
"type": "string"
180-
}
181-
},
182-
"additionalProperties": false
183-
}
184-
},
185-
"additionalProperties": false
186-
},
187164
{
188165
"description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse",
189166
"type": "object",

contracts/reflect/schema/reflect.json

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1421,29 +1421,6 @@
14211421
},
14221422
"additionalProperties": false
14231423
},
1424-
{
1425-
"description": "This calls into the native bank module for all denominations. Note that this may be much more expensive than Balance and should be avoided if possible. Return value is AllBalanceResponse.",
1426-
"deprecated": true,
1427-
"type": "object",
1428-
"required": [
1429-
"all_balances"
1430-
],
1431-
"properties": {
1432-
"all_balances": {
1433-
"type": "object",
1434-
"required": [
1435-
"address"
1436-
],
1437-
"properties": {
1438-
"address": {
1439-
"type": "string"
1440-
}
1441-
},
1442-
"additionalProperties": false
1443-
}
1444-
},
1445-
"additionalProperties": false
1446-
},
14471424
{
14481425
"description": "This calls into the native bank module for querying metadata for a specific bank token. Return value is DenomMetadataResponse",
14491426
"type": "object",

contracts/reflect/src/contract.rs

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ mod tests {
176176
use crate::testing::mock_dependencies_with_custom_querier;
177177
use cosmwasm_std::testing::{message_info, mock_env, MOCK_CONTRACT_ADDR};
178178
use cosmwasm_std::{
179-
coin, coins, from_json, AllBalanceResponse, BankMsg, BankQuery, Binary, Event, StakingMsg,
179+
coin, coins, from_json, BalanceResponse, BankMsg, BankQuery, Binary, Event, StakingMsg,
180180
StdError, SubMsgResponse, SubMsgResult,
181181
};
182182

@@ -385,17 +385,17 @@ mod tests {
385385
let deps = mock_dependencies_with_custom_querier(&coins(123, "ucosm"));
386386

387387
// with bank query
388-
#[allow(deprecated)]
389388
let msg = QueryMsg::Chain {
390-
request: BankQuery::AllBalances {
389+
request: BankQuery::Balance {
391390
address: MOCK_CONTRACT_ADDR.to_string(),
391+
denom: "ucosm".to_string(),
392392
}
393393
.into(),
394394
};
395395
let response = query(deps.as_ref(), mock_env(), msg).unwrap();
396396
let outer: ChainResponse = from_json(response).unwrap();
397-
let inner: AllBalanceResponse = from_json(outer.data).unwrap();
398-
assert_eq!(inner.amount, coins(123, "ucosm"));
397+
let inner: BalanceResponse = from_json(outer.data).unwrap();
398+
assert_eq!(inner.amount, coin(123, "ucosm"));
399399

400400
// with custom query
401401
let msg = QueryMsg::Chain {

0 commit comments

Comments
 (0)