Create connections with devices in a pairing process
This commit is contained in:
parent
d8c2b22c3d
commit
d9b8817ecc
@ -386,6 +386,19 @@ export default class Services {
|
||||
members.add(member)
|
||||
}
|
||||
}
|
||||
if (members.size === 0) {
|
||||
// This must be a pairing process
|
||||
// Check if we have a pairedAddresses in the public data
|
||||
const publicData = this.getPublicData(process);
|
||||
if (!publicData || !publicData['pairedAddresses']) {
|
||||
throw new Error('Not a pairing process');
|
||||
}
|
||||
const decodedAddresses = this.decodeValue(publicData['pairedAddresses']);
|
||||
if (decodedAddresses.length === 0) {
|
||||
throw new Error('Not a pairing process');
|
||||
}
|
||||
members.add({ sp_addresses: decodedAddresses });
|
||||
}
|
||||
await this.checkConnections([...members]);
|
||||
const privateSplitData = this.splitData(privateData);
|
||||
const publicSplitData = this.splitData(publicData);
|
||||
|
Loading…
x
Reference in New Issue
Block a user