Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
success = await Bluetooth.setWifiPassword(this.refs.wifipwd.value);
}
if (success) {
const state = await Bluetooth.getNetworkState();
console.log('state', state);
console.log('status', state.status);
console.log('ipAddress', state.ipAddress);
this.store.set({ipAddress: state.ipAddress});
success = state.status === Bluetooth.NETWORK_STATUS.COMPLETED;
}
if (success) {
console.log('COMPLETED');
goto('/redirect');
} else {
this.set({error: true});
}
this.set({waiting: false});
}
}
.then(wifiSSIDs => {
if (!wifiSSIDs) {
console.error('No wifi SSIDs returned', wifiSSIDs);
this.set({error: true});
} else {
console.log('Setting wifi SSIDs in Store:', wifiSSIDs);
this.store.set({wifiSSIDs: wifiSSIDs});
this.set({connecting: false});
goto('/wifi');
}
})
.catch(error => {