Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

code snippet typos #4640

Merged
merged 1 commit into from
Sep 18, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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