Skip to content

Commit

Permalink
Fix create account with private key austintgriffith#182
Browse files Browse the repository at this point in the history
  • Loading branch information
iamonuwa committed Jul 8, 2019
1 parent b1758b3 commit 8e4aea5
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,7 @@ export default class App extends Component {
vendors: {},
ethprice: 0.00,
hasUpdateOnce: false,
possibleNewPrivateKey: '',
exchangeRate: {
USD: 0.00
}
Expand All @@ -152,6 +153,7 @@ export default class App extends Component {
this.poll = this.poll.bind(this)
this.longPoll = this.longPoll.bind(this)
this.queryExchangeWithNativeCurrency = this.queryExchangeWithNativeCurrency.bind(this)
this.setPossibleNewPrivateKey = this.setPossibleNewPrivateKey.bind(this)
}

currencyDisplay = (amount)=>{
Expand Down Expand Up @@ -367,9 +369,13 @@ export default class App extends Component {
}

setPossibleNewPrivateKey(value){
this.setState({possibleNewPrivateKey:value},()=>{
this.dealWithPossibleNewPrivateKey()
this.setState({ possibleNewPrivateKey: value }, async () => {
await this.dealWithPossibleNewPrivateKey()
})
// await this.dealWithPossibleNewPrivateKey()
// this.setState({possibleNewPrivateKey:value},()=>{
// this.dealWithPossibleNewPrivateKey()
// })
}
async dealWithPossibleNewPrivateKey(){
//this happens as page load and you need to wait until
Expand Down Expand Up @@ -974,6 +980,7 @@ export default class App extends Component {
currencyDisplay={this.currencyDisplay}
tokenSendV2={tokenSendV2.bind(this)}
metaAccount={this.state.metaAccount}
setPossibleNewPrivateKey={this.setPossibleNewPrivateKey}
/>
</Card>
<Bottom
Expand Down

0 comments on commit 8e4aea5

Please sign in to comment.