From e7f6c870ed32b3cff5c47fab273f8ab5a60aef4b Mon Sep 17 00:00:00 2001 From: quentin Date: Tue, 1 Oct 2024 17:43:15 +0200 Subject: [PATCH] process no longer crashes when the esdt attributes are not from the sdk --- mocking/src/world/infos.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mocking/src/world/infos.rs b/mocking/src/world/infos.rs index 3a98961..c367ad4 100644 --- a/mocking/src/world/infos.rs +++ b/mocking/src/world/infos.rs @@ -135,8 +135,9 @@ impl ScenarioWorldInfos { let opt_attributes_expr = balance.opt_attributes .as_deref() .map(|e| { - base64::engine::general_purpose::STANDARD.decode(e).unwrap() - }); + base64::engine::general_purpose::STANDARD.decode(e) + }) + .and_then(|res| res.ok()); account = account.esdt_nft_balance(token_identifier, balance.nonce, &balance.amount, opt_attributes_expr); }