Skip to content

feat: configurable minimum deposit amount#86

Merged
greatest0fallt1me merged 7 commits intoCalloraOrg:mainfrom
Jopsan-gm:feat/27-merchants-list-endpoint
Feb 27, 2026
Merged

feat: configurable minimum deposit amount#86
greatest0fallt1me merged 7 commits intoCalloraOrg:mainfrom
Jopsan-gm:feat/27-merchants-list-endpoint

Conversation

@Jopsan-gm
Copy link
Contributor

Description

Closes #43

Adds tests to enforce the configurable minimum deposit amount in the vault contract.

Changes

  • contracts/vault/src/test.rs
    • Added deposit_below_minimum_panics: verifies that a deposit below min_deposit panics with "deposit below minimum"
    • Added deposit_equal_to_minimum_succeeds: verifies that a deposit exactly at the minimum is accepted
    • Added deposit_with_zero_minimum_always_succeeds: verifies that min_deposit = 0 disables the restriction (any amount accepted)
    • Fixed init_none_balance: corrected the init() call signature to include usdc_token and min_deposit parameters

Test Evidence

All deposit-related tests pass:
running 5 tests test test::deposit_below_minimum_panics - should panic ... ok test
test::deposit_equal_to_minimum_succeeds ... ok test 
test::deposit_with_zero_minimum_always_succeeds ... ok test 
test::test_deposit_and_balance ... ok test
test::deposit_and_deduct ... ok

test result: ok. 5 passed; 0 failed; 0 ignored
image

- Add tests for minimum deposit enforcement (issue CalloraOrg#43)
- deposit_below_minimum_panics: verifies deposits below min_deposit panic
- deposit_equal_to_minimum_succeeds: verifies exact minimum is accepted
- deposit_with_zero_minimum_always_succeeds: verifies min=0 disables restriction
- Fix init_none_balance test to use correct init() signature
@greatest0fallt1me
Copy link
Contributor

@Jopsan-gm resolve the conflicts

@Jopsan-gm
Copy link
Contributor Author

@greatest0fallt1me conflicts resolved!

@greatest0fallt1me
Copy link
Contributor

@Jopsan-gm please resolve the conflicts

@greatest0fallt1me
Copy link
Contributor

@Jopsan-gm

@Jopsan-gm
Copy link
Contributor Author

Hey @greatest0fallt1me sorry for the delay, the conflicts have been resolved.

@greatest0fallt1me greatest0fallt1me merged commit 6c65056 into CalloraOrg:main Feb 27, 2026
0 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Enforce Minimum Deposit Amount (Configurable)

2 participants