Skip to content

Commit

Permalink
try this to detect external web3
Browse files Browse the repository at this point in the history
  • Loading branch information
Austin committed Apr 19, 2019
1 parent ec03fc2 commit 7ab0726
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/App.js
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,8 @@ class App extends Component {
saveKey(update){
this.setState(update)
}
componentDidMount(){

document.body.style.backgroundColor = mainStyle.backgroundColor
console.log("DETECTING INCOG....")
detectContext(){
console.log("DETECTING CONTEXT....")
//snagged from https://stackoverflow.com/questions/52759238/private-incognito-mode-detection-for-ios-12-safari
incogDetect((result)=>{
if(result){
Expand Down Expand Up @@ -365,11 +363,14 @@ class App extends Component {
}
}
})
}
componentDidMount(){

document.body.style.backgroundColor = mainStyle.backgroundColor

Wyre.configure();


this.detectContext()

console.log("document.getElementsByClassName('className').style",document.getElementsByClassName('.btn').style)
window.addEventListener("resize", this.updateDimensions.bind(this));
Expand Down Expand Up @@ -1940,6 +1941,7 @@ render() {
if (state.web3Provider) {
state.web3 = new Web3(state.web3Provider)
this.setState(state,()=>{
this.detectContext()
//console.log("state set:",this.state)
if(this.state.possibleNewPrivateKey){
this.dealWithPossibleNewPrivateKey()
Expand Down

0 comments on commit 7ab0726

Please sign in to comment.