Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

chore(abi): reformat error mapping in encode_erc20_transfer\n\nReformatted the error mapping closure in `encode_erc20_transfer` to use a single expression with a trailing comma, and removed an unnecessary line break in the test file. This is a purely cosmetic change with no behavioural impact.\n\nAuto-committed-on: dragonfly\n

Steven Enamakel6e6968603786
diff --git a/src/openhuman/modules/wallet_tests.rs b/src/openhuman/modules/wallet_tests.rs
index a613ff50bf..6ca95a710d 100644
--- a/src/openhuman/modules/wallet_tests.rs
+++ b/src/openhuman/modules/wallet_tests.rs
@@ -261,8 +261,7 @@ mod contract {
#[test]
fn the_registry_entry_matches_the_interface_this_client_calls() {
- let record =
- registry::find("tinywallet").expect("the tinywallet record is compiled in");
+ let record = registry::find("tinywallet").expect("the tinywallet record is compiled in");
assert_eq!(record.bus_name, tinywallet_bus::BUS_NAME);
assert_eq!(record.object_path, tinywallet_bus::OBJECT_PATH);
assert!(
diff --git a/src/openhuman/web3/wallet/abi.rs b/src/openhuman/web3/wallet/abi.rs
index 4f9cce9fcb..91cfb2c11d 100644
--- a/src/openhuman/web3/wallet/abi.rs
+++ b/src/openhuman/web3/wallet/abi.rs
@@ -27,18 +27,20 @@
/// amount is not a non-negative integer that fits in 256 bits.
#[allow(unreachable_patterns)]
pub fn encode_erc20_transfer(to_address: &str, amount_raw: &str) -> Result<String, String> {
- tinywallet_bus::abi::encode_erc20_transfer(to_address, amount_raw).map_err(|error| match error {
- tinywallet_bus::abi::Error::InvalidRecipient { .. } => {
- format!("invalid EVM recipient address '{to_address}': {error}")
- }
- // Preserves the wording the previous implementation used, because the
- // agent tool's schema documents it and a model reads it to correct
- // itself.
- tinywallet_bus::abi::Error::InvalidAmount { .. } => {
- format!("amount '{amount_raw}' is not a valid non-negative integer")
- }
- _ => error.to_string(),
- })
+ tinywallet_bus::abi::encode_erc20_transfer(to_address, amount_raw).map_err(
+ |error| match error {
+ tinywallet_bus::abi::Error::InvalidRecipient { .. } => {
+ format!("invalid EVM recipient address '{to_address}': {error}")
+ }
+ // Preserves the wording the previous implementation used, because the
+ // agent tool's schema documents it and a model reads it to correct
+ // itself.
+ tinywallet_bus::abi::Error::InvalidAmount { .. } => {
+ format!("amount '{amount_raw}' is not a valid non-negative integer")
+ }
+ _ => error.to_string(),
+ },
+ )
}
#[cfg(test)]