The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
chore(abi): reformat error mapping in encode_erc20_transfer
Steven Enamakel97b779918953
diff --git a/src/openhuman/modules/wallet_tests.rs b/src/openhuman/modules/wallet_tests.rsindex 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.rsindex 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)]