From 62972994895056650d04f416b1de9b12a250450d Mon Sep 17 00:00:00 2001 From: Victor Baranov Date: Thu, 3 Dec 2020 14:05:37 +0300 Subject: [PATCH] Fix write call without params --- CHANGELOG.md | 2 +- apps/block_scout_web/assets/js/lib/smart_contract/functions.js | 2 +- apps/explorer/package-lock.json | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f45b16cfd6..5b1c3b7b0a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,7 +7,7 @@ ### Fixes - [#3433](https://github.com/poanetwork/blockscout/pull/3433) - Token balances and rewards tables deadlocks elimination -- [#3494](https://github.com/poanetwork/blockscout/pull/3494), [#3497](https://github.com/poanetwork/blockscout/pull/3497) - Contracts interaction: fix method call with array[] input +- [#3494](https://github.com/poanetwork/blockscout/pull/3494), [#3497](https://github.com/poanetwork/blockscout/pull/3497), [#3504](https://github.com/poanetwork/blockscout/pull/3504) - Contracts interaction: fix method call with array[] input - [#3494](https://github.com/poanetwork/blockscout/pull/3494), [#3495](https://github.com/poanetwork/blockscout/pull/3495) - Contracts interaction: fix tuple output display - [#3479](https://github.com/poanetwork/blockscout/pull/3479) - Fix working with big numbers in Staking DApp - [#3477](https://github.com/poanetwork/blockscout/pull/3477) - Contracts interaction: fix broken call of GnosisProxy contract methods with parameters diff --git a/apps/block_scout_web/assets/js/lib/smart_contract/functions.js b/apps/block_scout_web/assets/js/lib/smart_contract/functions.js index 027bf30e26..def0e341c8 100644 --- a/apps/block_scout_web/assets/js/lib/smart_contract/functions.js +++ b/apps/block_scout_web/assets/js/lib/smart_contract/functions.js @@ -150,7 +150,7 @@ function callMethod (isWalletEnabled, $functionInputs, explorerChainId, $form, f const inputsCount = inputs && inputs.length let methodToCall const sendParams = { from: currentAccount, value: txValue || 0 } - if (inputsCount > 1) { + if (inputsCount > 1 || inputsCount === 0) { methodToCall = TargetContract.methods[functionName](...args).send(sendParams) } else { const inputType = inputs[0] && inputs[0].type diff --git a/apps/explorer/package-lock.json b/apps/explorer/package-lock.json index 2623fff7e1..8d7ba9df18 100644 --- a/apps/explorer/package-lock.json +++ b/apps/explorer/package-lock.json @@ -130,7 +130,7 @@ }, "os-tmpdir": { "version": "1.0.2", - "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "resolved": "http://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=" }, "path-is-absolute": {