junction
junction copied to clipboard
Multiple devices of the same 'type' cannot be co-signers
Two Trezor 1 devices will show up with same name 'trezor'. Adding the first as a signer works, but adding the second as a signer will result in an exception.
This is because the inclusion check on the signers collection (junction.py, line 155
) only takes name into account:
if name in [signer.name for signer in self.signers]:
raise JunctionError(f'Name "{name}" already taken')
and the client code sets the signer name (Wallet.tsx
) to the device.type
await api.addSigner({
wallet_name: this.props.activeWallet.name,
signer_name: device.type,
device_id: device.fingerprint,
})
@justinmoon If I'm reading hwilib correctly, the fingerprint is derived from the xpub. If that's true it should be safe to use as a unique identifier in lookups. Later UX iterations could provide the ability for the user to alias the device.