Skip to content

Commit

Permalink
[Rust SDK] Handle unwrap in wallet context (MystenLabs#18882)
Browse files Browse the repository at this point in the history
## Description 

Handle unwrap in wallet context

## Test plan 

How did you test the new or updated feature?

---

## Release notes

Check each box that your changes affect. If none of the boxes relate to
your changes, release notes aren't required.

For each box you select, include information after the relevant heading
that describes the impact of your changes that a user might notice and
any actions they must take to implement updates.

- [ ] Protocol: 
- [ ] Nodes (Validators and Full nodes): 
- [ ] Indexer: 
- [ ] JSON-RPC: 
- [ ] GraphQL: 
- [ ] CLI: 
- [ ] Rust SDK:
- [ ] REST API:
  • Loading branch information
stefan-mysten authored Aug 1, 2024
1 parent e1540fd commit b4f6f3c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/sui-sdk/src/wallet_context.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ impl WalletContext {
budget: u64,
forbidden_gas_objects: BTreeSet<ObjectID>,
) -> Result<(u64, SuiObjectData), anyhow::Error> {
for o in self.gas_objects(address).await.unwrap() {
for o in self.gas_objects(address).await? {
if o.0 >= budget && !forbidden_gas_objects.contains(&o.1.object_id) {
return Ok((o.0, o.1));
}
Expand Down

0 comments on commit b4f6f3c

Please sign in to comment.