Pair device when receiving both confirmations
This commit is contained in:
parent
933f8398dd
commit
76baca6e30
@ -179,6 +179,7 @@ export default class ModalService {
|
||||
}
|
||||
console.log("Device 2 is ready - Device 1 can now proceed");
|
||||
}
|
||||
service.pairDevice(this.paired_addresses, this.processId);
|
||||
this.paired_addresses = [];
|
||||
this.processId = null;
|
||||
this.stateId = null;
|
||||
@ -219,6 +220,8 @@ export default class ModalService {
|
||||
} catch (e) {
|
||||
throw e;
|
||||
}
|
||||
|
||||
service.pairDevice(this.paired_addresses, this.processId!);
|
||||
|
||||
this.paired_addresses = [];
|
||||
this.processId = null;
|
||||
|
@ -524,13 +524,11 @@ export default class Services {
|
||||
}
|
||||
}
|
||||
|
||||
pairDevice(spAddressList: string[]) {
|
||||
if (this.currentProcess) {
|
||||
try {
|
||||
this.sdkClient.pair_device(this.currentProcess, spAddressList);
|
||||
} catch (e) {
|
||||
throw new Error(`Failed to pair device: ${e}`);
|
||||
}
|
||||
pairDevice(spAddressList: string[], pairingProcess: string) {
|
||||
try {
|
||||
this.sdkClient.pair_device(pairingProcess, spAddressList);
|
||||
} catch (e) {
|
||||
throw new Error(`Failed to pair device: ${e}`);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user