MetaMask / eth-ledger-bridge-keyring

A wrapper around LedgerJS libraries, to support the KeyringController protocol used by MetaMask
ISC License
80 stars 93 forks source link

`LedgerIframeBridge.destroy` does not remove the iframe from document #237

Open mikesposito opened 2 months ago

mikesposito commented 2 months ago

The LedgerIframeBridge.destroy method does not destroy/remove the iframe from the document: when calling destroy and then init again, the document will have two Ledger iframes, which could lead to unexpected behavior. Because of this, the default behaviour of setOptions is duplicating the current iframe.

We should remove the current iframe from the document when destroy is called.