From a8df0a507c556d78860800acd43151d10f34bb4a Mon Sep 17 00:00:00 2001 From: nikitosing Date: Mon, 30 Aug 2021 09:05:44 +0300 Subject: [PATCH] Fix NaN input in write contract --- CHANGELOG.md | 1 + apps/block_scout_web/assets/js/lib/smart_contract/write.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8a21d28c91..98bf618256 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ ### Features ### Fixes +- [#4582](https://github.com/blockscout/blockscout/pull/4582) - Fix NaN input on write contract page ### Chore diff --git a/apps/block_scout_web/assets/js/lib/smart_contract/write.js b/apps/block_scout_web/assets/js/lib/smart_contract/write.js index fd6bacb3ec..ed65b7b0a5 100644 --- a/apps/block_scout_web/assets/js/lib/smart_contract/write.js +++ b/apps/block_scout_web/assets/js/lib/smart_contract/write.js @@ -151,5 +151,5 @@ function getTxValue ($functionInputs) { const $txValue = $functionInputs.filter('[tx-value]:first') const txValue = $txValue && $txValue.val() && parseFloat($txValue.val()) * WEI_MULTIPLIER const txValueStr = txValue && txValue.toString(16) - return txValueStr + return '0x' + txValueStr }