Merge pull request #3655 from poanetwork/vb-contract-reader-android-browser-fix

Handle absence of replaceAll function in some old/legacy browsers
pull/3659/head
Victor Baranov 4 years ago committed by GitHub
commit 82e4a0a01b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 6
      apps/block_scout_web/assets/js/lib/smart_contract/functions.js

@ -10,6 +10,7 @@
- [#3564](https://github.com/poanetwork/blockscout/pull/3564) - Staking welcome message
### Fixes
- [#3655](https://github.com/poanetwork/blockscout/pull/3655) - Handle absence of readAll function in some old/legacy browsers
- [#3634](https://github.com/poanetwork/blockscout/pull/3634) - Fix transaction decoding view: support tuple types
- [#3623](https://github.com/poanetwork/blockscout/pull/3623) - Ignore unrecognized messages in bridge counter processes
- [#3622](https://github.com/poanetwork/blockscout/pull/3622) - Contract reader: fix int type output Ignore unrecognized messages in bridge counter processes

@ -202,7 +202,11 @@ function prepareMethodArgs ($functionInputs, inputs) {
let preparedVal
if (isNonSpaceInputType(inputType)) { preparedVal = val.replace(/\s/g, '') } else { preparedVal = val }
if (isAddressInputType(inputType)) {
preparedVal = preparedVal.replaceAll('"', '')
if (typeof preparedVal.replaceAll === 'function') {
preparedVal = preparedVal.replaceAll('"', '')
} else {
preparedVal = preparedVal.replace(/"/g, '')
}
}
if (isArrayInputType(inputType)) {
if (preparedVal === '') {

Loading…
Cancel
Save