Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanfrey committed Mar 24, 2022
1 parent 9ad5fef commit cd6b88c
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions contracts/cw20-ics20/src/migrations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,16 +60,14 @@ pub mod v2 {
Amount::Cw20(coin) => {
// FIXME: we should be able to do this with the following line, but QuerierWrapper doesn't play
// with the Querier generics
// Cw20Contract(contract.clone()).balance(&deps.querier, contract)?
let msg = Cw20QueryMsg::Balance {
address: contract.into(),
};
// `Cw20Contract(contract.clone()).balance(&deps.querier, contract)?`
let query = WasmQuery::Smart {
contract_addr: coin.address,
msg: to_binary(&msg)?,
}
.into();
let res: BalanceResponse = deps.querier.query(&query)?;
msg: to_binary(&Cw20QueryMsg::Balance {
address: contract.into(),
})?,
};
let res: BalanceResponse = deps.querier.query(&query.into())?;
res.balance
}
};
Expand Down

0 comments on commit cd6b88c

Please sign in to comment.