Skip to content

Commit

Permalink
code snippet typos
Browse files Browse the repository at this point in the history
  • Loading branch information
stalewhale authored and sblackshear committed Sep 18, 2022
1 parent c9e1855 commit 1a3adb8
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions doc/src/build/programming-with-objects/ch4-object-wrapping.md
Original file line number Diff line number Diff line change
Expand Up @@ -156,15 +156,15 @@ The above code does the swap: it sends `object1` to the original owner of `objec

```rust
let service_address = tx_context::sender(ctx);
Balance::join(&mut fee1, fee2);
balance::join(&mut fee1, fee2);
transfer::transfer(coin::from_balance(fee1, ctx), service_address);
```

`fee2` is merged into `fee1`, turned into a `Coin` and sent to the `service_address`. Finally, we signal Sui that we have deleted both wrapper objects:

```rust
id::delete(id1);
id::delete(id2);
object::delete(id1);
object::delete(id2);
```

At the end of this call, the two objects have been swapped (sent to the opposite owner) and the service provider takes the service fee.
Expand Down

0 comments on commit 1a3adb8

Please sign in to comment.