From d49baa25fabf7ed26cb78011e68fab96a1e3de2f Mon Sep 17 00:00:00 2001 From: abefernan <44572727+abefernan@users.noreply.github.com> Date: Wed, 26 Jul 2023 17:50:02 +0200 Subject: [PATCH] Check empty salt --- .../CreateTxForm/MsgForm/MsgInstantiateContract2Form.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/components/forms/CreateTxForm/MsgForm/MsgInstantiateContract2Form.tsx b/components/forms/CreateTxForm/MsgForm/MsgInstantiateContract2Form.tsx index 56951e8..900dc58 100644 --- a/components/forms/CreateTxForm/MsgForm/MsgInstantiateContract2Form.tsx +++ b/components/forms/CreateTxForm/MsgForm/MsgInstantiateContract2Form.tsx @@ -81,6 +81,10 @@ const MsgInstantiateContract2Form = ({ } try { + if (!salt) { + throw new Error("Salt is required"); + } + fromHex(salt); } catch (e) { setSaltError(e instanceof Error ? e.message : "Salt needs to be an hexadecimal string");