Merge pull request #4240 from blockscout/np-bug-with-empty-array

Fix bug with empty array in write contract page
pull/4241/head
Victor Baranov 4 years ago committed by GitHub
commit 4ae3843ffa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 2
      apps/block_scout_web/assets/js/lib/smart_contract/common_helpers.js

@ -7,6 +7,7 @@
- [#4067](https://github.com/blockscout/blockscout/pull/4067) - Display LP tokens USD value and custom metadata in tokens dropdown at address page
### Fixes
- [#4240](https://github.com/blockscout/blockscout/pull/4240) - `[]` is accepted in write contract page
- [#4236](https://github.com/blockscout/blockscout/pull/4236), [#4242](https://github.com/blockscout/blockscout/pull/4242) - Fix typo, constructor instead of contructor
- [#4167](https://github.com/blockscout/blockscout/pull/4167) - Deduplicate block numbers in acquire_blocks function
- [#4149](https://github.com/blockscout/blockscout/pull/4149) - Exclude smart_contract_additional_sources from JSON encoding in address schema

@ -27,7 +27,7 @@ export function prepareMethodArgs ($functionInputs, inputs) {
sanitizedInputValue = replaceDoubleQuotes(sanitizedInputValue, inputType, inputComponents)
if (isArrayInputType(inputType) || isTupleInputType(inputType)) {
if (sanitizedInputValue === '') {
if (sanitizedInputValue === '' || sanitizedInputValue === '[]') {
return [[]]
} else {
if (sanitizedInputValue.startsWith('[') && sanitizedInputValue.endsWith(']')) {

Loading…
Cancel
Save