Skip to content

Commit cb2cb26

Browse files
authored
Fix misleading error message (#3183)
## Motivation <!-- Briefly describe the goal(s) of this PR. --> ## Proposal Corrected error message in the Message::Swap handler so that it reflects the swap operation rather than adding liquidity. ## Test Plan <!-- Explain how you made sure that the changes are correct and that they perform as intended. Please describe testing protocols (CI, manual tests, benchmarks, etc) in a way that others can reproduce the results. --> ## Release Plan <!-- If this PR targets the `main` branch, **keep the applicable lines** to indicate if you recommend the changes to be picked in release branches, SDKs, and hotfixes. This generally concerns only bug fixes. Note that altering the public protocol (e.g. transaction format, WASM syscalls) or storage formats requires a new deployment. --> - Nothing to do / These changes follow the usual release cycle. - These changes should be backported to the latest `devnet` branch, then - be released in a new SDK, - be released in a validator hotfix. - These changes should be backported to the latest `testnet` branch, then - be released in a new SDK, - be released in a validator hotfix. - Backporting is not possible but we may want to deploy a new `devnet` and release a new SDK soon. ## Links <!-- Optional section for related PRs, related issues, and other references. If needed, please create issues to track future improvements and link them here. --> - [reviewer checklist](https://github.com/linera-io/linera-protocol/blob/main/CONTRIBUTING.md#reviewer-checklist)
1 parent 9ca65bf commit cb2cb26

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/amm/src/contract.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ impl Contract for AmmContract {
7070
// It's assumed that the tokens have already been transferred here at this point
7171
assert!(
7272
input_amount > Amount::ZERO,
73-
"You can't add liquidity with zero tokens"
73+
"You can't swap with zero tokens"
7474
);
7575

7676
assert!(input_token_idx < 2, "Invalid token index");

0 commit comments

Comments
 (0)