Merge pull request #7091 from blockscout/np-fix-custom-abi

Fix custom ABI loading
pull/7092/head
Victor Baranov 2 years ago committed by GitHub
commit 55e1aad530
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 1
      CHANGELOG.md
  2. 10
      apps/block_scout_web/assets/js/lib/smart_contract/functions.js

@ -9,6 +9,7 @@
### Fixes
- [#7091](https://github.com/blockscout/blockscout/pull/7091) - Fix custom ABI
- [#7062](https://github.com/blockscout/blockscout/pull/7062) - Save block count in the DB when calculated in Cache module
- [#7008](https://github.com/blockscout/blockscout/pull/7008) - Fetch image/video content from IPFS link
- [#7007](https://github.com/blockscout/blockscout/pull/7007), [#7031](https://github.com/blockscout/blockscout/pull/7031), [#7058](https://github.com/blockscout/blockscout/pull/7058), [#7061](https://github.com/blockscout/blockscout/pull/7061), [#7067](https://github.com/blockscout/blockscout/pull/7067) - Token instance fetcher fixes

@ -101,19 +101,19 @@ const readWriteFunction = (element) => {
const container = $('[data-smart-contract-functions]')
if (container.length) {
getWalletAndLoadFunctions()
getWalletAndLoadFunctions(false, container)
}
const customABIContainer = $('[data-smart-contract-functions-custom]')
if (customABIContainer.length) {
getWalletAndLoadFunctions()
getWalletAndLoadFunctions(true, customABIContainer)
}
function getWalletAndLoadFunctions () {
function getWalletAndLoadFunctions (isCustomABI, container) {
getCurrentAccountPromise(window.web3 && window.web3.currentProvider).then((currentAccount) => {
loadFunctions(container, false, currentAccount)
loadFunctions(container, isCustomABI, currentAccount)
}, () => {
loadFunctions(container, false, null)
loadFunctions(container, isCustomABI, null)
})
}

Loading…
Cancel
Save