Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions packages/contracts/vault/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -651,8 +651,11 @@ impl MeridianVault {
if new_shares <= 0 {
return Err(ContractError::DepositTooSmall);
}
// Price the new adapter from a fresh read so a cache-backed adapter
// (e.g. Blend) reports its real post-deposit value, matching deposit().
// The value this migration delivered is the delta over the target's
// pre-existing balance, not its raw post-transfer total.
new_adapter_client.refresh();
let value_after = new_adapter_client
.total_assets()
.checked_sub(new_adapter_value_before)
Expand Down
Loading