Skip to content

Commit 7b5b898

Browse files
author
martinvibes
committed
chore: remove advanced and basic usage examples from the examples directory and updates
1 parent f43800a commit 7b5b898

3 files changed

Lines changed: 11 additions & 307 deletions

File tree

examples/advanced_usage.rs

Lines changed: 0 additions & 246 deletions
This file was deleted.

examples/basic_usage.rs

Lines changed: 0 additions & 54 deletions
This file was deleted.

src/swappr.rs

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,13 @@ impl AutoSwappr {
165165
success: true,
166166
tx_hash: x.transaction_hash,
167167
})),
168-
Err(_) => Err(Json(ErrorResponse {
169-
success: false,
170-
message: "FAILED TO SWAP".to_string(),
171-
})),
168+
Err(x) => {
169+
println!("FAILED TO SWAP {:?}", x);
170+
Err(Json(ErrorResponse {
171+
success: false,
172+
message: "FAILED TO SWAP".to_string(),
173+
}))
174+
}
172175
}
173176
}
174177

@@ -265,6 +268,7 @@ mod tests {
265268
let result = swapper.ekubo_manual_swap(*STRK, *USDC, 1);
266269
assert!(result.await.is_ok())
267270
}
271+
268272
#[tokio::test]
269273
#[ignore = "owner address and private key is required to run the test"]
270274
async fn swap_with_zero_amount() {
@@ -282,7 +286,7 @@ mod tests {
282286
}
283287

284288
#[tokio::test]
285-
#[ignore = "owner address and private key is required to run the test"]
289+
// #[ignore = "owner address and private key is required to run the test"]
286290
async fn it_works_argent() {
287291
let rpc_url = "YOUR MAINNET RPC".to_string();
288292
let account_address = "YOUR WALLET ADDRESS".to_string();
@@ -294,8 +298,8 @@ mod tests {
294298
.unwrap();
295299
let result = swapper.ekubo_manual_swap(*STRK, *USDC, 1);
296300

297-
assert!(result.await.is_ok());
298-
// println!("test complete {:?}", result.await.err().unwrap().message);
301+
// assert!(result.await.is_ok());
302+
println!("test complete {:?}", result.await.ok().unwrap().tx_hash);
299303
}
300304

301305
#[tokio::test]

0 commit comments

Comments
 (0)