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");
|
console.log("Device 2 is ready - Device 1 can now proceed");
|
||||||
}
|
}
|
||||||
|
service.pairDevice(this.paired_addresses, this.processId);
|
||||||
this.paired_addresses = [];
|
this.paired_addresses = [];
|
||||||
this.processId = null;
|
this.processId = null;
|
||||||
this.stateId = null;
|
this.stateId = null;
|
||||||
@ -220,6 +221,8 @@ export default class ModalService {
|
|||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
service.pairDevice(this.paired_addresses, this.processId!);
|
||||||
|
|
||||||
this.paired_addresses = [];
|
this.paired_addresses = [];
|
||||||
this.processId = null;
|
this.processId = null;
|
||||||
this.stateId = null;
|
this.stateId = null;
|
||||||
|
@ -524,13 +524,11 @@ export default class Services {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pairDevice(spAddressList: string[]) {
|
pairDevice(spAddressList: string[], pairingProcess: string) {
|
||||||
if (this.currentProcess) {
|
try {
|
||||||
try {
|
this.sdkClient.pair_device(pairingProcess, spAddressList);
|
||||||
this.sdkClient.pair_device(this.currentProcess, spAddressList);
|
} catch (e) {
|
||||||
} catch (e) {
|
throw new Error(`Failed to pair device: ${e}`);
|
||||||
throw new Error(`Failed to pair device: ${e}`);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user