Skip to content

Commit

Permalink
fix: integration test and document
Browse files Browse the repository at this point in the history
  • Loading branch information
VladasZ committed Sep 18, 2024
1 parent 7044e36 commit 7c3522f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
3 changes: 3 additions & 0 deletions integration-tests/src/withdraw_all.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ async fn withdraw_all() -> Result<()> {

context.fast_forward_minutes(6).await?;

// 3 calls to fully claim 210 jars
context.sweat_jar().claim_total(None).with_user(&alice).await?;
context.sweat_jar().claim_total(None).with_user(&alice).await?;
context.sweat_jar().claim_total(None).with_user(&alice).await?;

let alice_balance = context.ft_contract().ft_balance_of(alice.to_near()).await?;
Expand Down
4 changes: 3 additions & 1 deletion model/src/api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,9 @@ pub trait InitApi {
/// The `ClaimApi` trait defines methods for claiming interest from jars within the smart contract.
#[make_integration_version]
pub trait ClaimApi {
/// Claims all available interest from all deposit jars belonging to the calling account.
/// Claims available interest from up to 100 jars with the most interest for the calling account.
/// If the calling account has more than 100 jars, the user will need to call this method multiple times
/// to claim interest from all jars.
///
/// * `detailed` – An optional boolean value specifying if the method must return only total amount of claimed tokens
/// or detailed summary for each claimed jar. Set it `true` to get a detailed result. In case of `false`
Expand Down

0 comments on commit 7c3522f

Please sign in to comment.