From 0641d65994966b52cdc14f4d357774d2aad22180 Mon Sep 17 00:00:00 2001 From: Robert Zaremba Date: Wed, 25 Oct 2023 02:55:12 +0200 Subject: [PATCH] registry: optimize _sbt_recover --- contracts/registry/src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/contracts/registry/src/lib.rs b/contracts/registry/src/lib.rs index 35bba17..4594b37 100644 --- a/contracts/registry/src/lib.rs +++ b/contracts/registry/src/lib.rs @@ -409,11 +409,11 @@ impl Contract { for (key, token) in self .balances - .iter_from(balance_key(from.clone(), start.issuer_id, start.token)) + .iter_from(balance_key(from.clone(), issuer_id, start.token)) .take(limit) { if key.owner != from || key.issuer_id != issuer_id { - continue; + break; } tokens_recovered += 1; let mut t = self.get_token(key.issuer_id, token);