Skip to content

Commit

Permalink
fix: fix document
Browse files Browse the repository at this point in the history
  • Loading branch information
zensh committed Feb 17, 2025
1 parent 8459b1c commit ae8b7f6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 12 deletions.
1 change: 1 addition & 0 deletions tools/anda_icp/src/ledger/balance.rs
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,7 @@ mod tests {
// "name": "icp_ledger_balance_of",
// "description": "Query the balance of the specified account on ICP blockchain for the following tokens: ICP, PANDA",
// "parameters": {
// "additionalProperties": false,
// "description": "Arguments for the balance of an account for a token",
// "properties": {
// "account": {
Expand Down
17 changes: 5 additions & 12 deletions tools/anda_icp/src/ledger/transfer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ use super::ICPLedgers;

/// Arguments for transferring tokens to an account
#[derive(Debug, Clone, Deserialize, Serialize, JsonSchema)]
#[serde(deny_unknown_fields)]
pub struct TransferToArgs {
/// ICP account address (principal) to receive token, e.g. "77ibd-jp5kr-moeco-kgoar-rro5v-5tng4-krif5-5h2i6-osf2f-2sjtv-kqe"
pub account: String,
Expand Down Expand Up @@ -93,8 +92,9 @@ impl Tool<BaseCtx> for TransferTool {
async fn call(&self, ctx: BaseCtx, data: Self::Args) -> Result<Self::Output, BoxError> {
let (ledger, tx) = self.ledgers.transfer(&ctx, ctx.id(), data).await?;
Ok(format!(
"Transfer success, transaction id: {}, details: https://www.icexplorer.io/token/details/{}",
tx.0.to_u64().unwrap_or(0), ledger.to_text()
"Successful, transaction ID: {}, detail: https://www.icexplorer.io/token/details/{}",
tx.0.to_u64().unwrap_or(0),
ledger.to_text()
))
}
}
Expand Down Expand Up @@ -134,8 +134,9 @@ mod tests {
println!("{}", s);
// {
// "name": "icp_ledger_transfer",
// "description": "Transfer ICP, PANDA tokens to the specified account on ICP network.",
// "description": "Transfer ICP, PANDA tokens to the specified account on ICP blockchain.",
// "parameters": {
// "additionalProperties": false,
// "description": "Arguments for transferring tokens to an account",
// "properties": {
// "account": {
Expand All @@ -144,16 +145,8 @@ mod tests {
// },
// "amount": {
// "description": "Token amount, e.g. 1.1 ICP",
// "format": "double",
// "type": "number"
// },
// "memo": {
// "description": "Optional memo (should be less than 32 bytes)",
// "type": [
// "string",
// "null"
// ]
// },
// "symbol": {
// "description": "Token symbol, e.g. \"ICP\"",
// "type": "string"
Expand Down

0 comments on commit ae8b7f6

Please sign in to comment.