Skip to content

Commit 69d1bf1

Browse files
committed
remove live indexes when clearing scores
1 parent 12e0e79 commit 69d1bf1

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

contracts/ledgerlens-score/src/storage.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1149,6 +1149,8 @@ pub fn clear_score_history(env: &Env, wallet: &Address, asset_pair: &Symbol) {
11491149
pub fn clear_score(env: &Env, wallet: &Address, asset_pair: &Symbol) {
11501150
let key = DataKey::Score(wallet.clone(), asset_pair.clone());
11511151
env.storage().persistent().remove(&key);
1152+
remove_pair_for_wallet(env, wallet, asset_pair);
1153+
remove_score_entry(env, wallet, asset_pair);
11521154
}
11531155

11541156
pub fn get_deletion_approval_policy(env: &Env) -> DeletionApprovalPolicy {

0 commit comments

Comments
 (0)