mirror of
https://github.com/kremalicious/blog.git
synced 2024-11-15 01:25:28 +01:00
fix blockies
This commit is contained in:
parent
fcb2fd1052
commit
be9ed4c0e3
@ -127,19 +127,14 @@ export default class Web3Donation extends PureComponent {
|
|||||||
this.setState({
|
this.setState({
|
||||||
error: null,
|
error: null,
|
||||||
accounts,
|
accounts,
|
||||||
selectedAccount: accounts[0]
|
selectedAccount: accounts[0].toLowerCase()
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
handleButton = () => {
|
sendTransaction() {
|
||||||
const { web3 } = this
|
const { web3 } = this
|
||||||
|
|
||||||
this.setState({
|
|
||||||
loading: true,
|
|
||||||
message: 'Waiting for your confirmation...'
|
|
||||||
})
|
|
||||||
|
|
||||||
web3.eth
|
web3.eth
|
||||||
.sendTransaction({
|
.sendTransaction({
|
||||||
from: this.state.selectedAccount,
|
from: this.state.selectedAccount,
|
||||||
@ -158,6 +153,15 @@ export default class Web3Donation extends PureComponent {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
handleButton = () => {
|
||||||
|
this.setState({
|
||||||
|
loading: true,
|
||||||
|
message: 'Waiting for your confirmation...'
|
||||||
|
})
|
||||||
|
|
||||||
|
this.sendTransaction()
|
||||||
|
}
|
||||||
|
|
||||||
onAmountChange = ({ target }) => {
|
onAmountChange = ({ target }) => {
|
||||||
this.setState({ amount: target.value })
|
this.setState({ amount: target.value })
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user