Merge pull request #318 from poanetwork/vb-fix-pasting-abi
Fix pasting of ABI for contract type account
This commit is contained in:
commit
8d86a60a24
|
@ -2,6 +2,8 @@
|
|||
|
||||
## Current Master
|
||||
|
||||
- [#318](https://github.com/poanetwork/nifty-wallet/pull/318) - (Fix) pasting of ABI for contract type account
|
||||
|
||||
## 4.11.10 Tue Feb 04 2020
|
||||
|
||||
- [#313](https://github.com/poanetwork/nifty-wallet/pull/313) - Change Ethereum classic RPC endpoint
|
||||
|
|
|
@ -41,13 +41,13 @@ class ContractImportView extends Component {
|
|||
})
|
||||
}
|
||||
|
||||
abiOnChange (abi) {
|
||||
abiOnChange (abi, APIInputDisabled) {
|
||||
this.props.hideWarning()
|
||||
try {
|
||||
if (abi) {
|
||||
this.setState({
|
||||
abi: JSON.stringify(abi),
|
||||
abiInputDisabled: true,
|
||||
abi: abi,
|
||||
abiInputDisabled: APIInputDisabled || false,
|
||||
importDisabled: false,
|
||||
})
|
||||
}
|
||||
|
@ -124,7 +124,15 @@ class ContractImportView extends Component {
|
|||
return
|
||||
}
|
||||
getFullABI(web3.eth, contractAddr, network, type)
|
||||
.then(finalABI => this.abiOnChange(finalABI))
|
||||
.then(finalABI => {
|
||||
if (finalABI) {
|
||||
finalABI = JSON.stringify(finalABI)
|
||||
const APIInputDisabled = true
|
||||
return this.abiOnChange(finalABI, APIInputDisabled)
|
||||
} else {
|
||||
return null
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
this.clearAbi()
|
||||
log.debug(e)
|
||||
|
|
Loading…
Reference in New Issue