Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit 8cdd03b

Browse files
authored
[example] fix coin.balance -> coin.value (#981)
1 parent 24ae6f8 commit 8cdd03b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

apps/nextra/pages/en/build/smart-contracts/book/structs-and-resources.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ module 0x2::m {
531531
}
532532
533533
public fun withdraw(coin: &mut Coin, amount: u64): Coin {
534-
assert!(coin.balance >= amount, 1000);
534+
assert!(coin.value >= amount, 1000);
535535
coin.value = coin.value - amount;
536536
Coin { value: amount }
537537
}

0 commit comments

Comments
 (0)