Skip to content

Commit

Permalink
fix(trezor): pin connect url to stable version
Browse files Browse the repository at this point in the history
  • Loading branch information
bucko13 committed Jan 29, 2024
1 parent 8960d14 commit 5b256bf
Showing 1 changed file with 10 additions and 13 deletions.
23 changes: 10 additions & 13 deletions src/trezor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,21 +109,18 @@ const TREZOR_DEV =
env_variables.TREZOR_DEV ||
env_variables.REACT_APP_TREZOR_DEV ||
env_variables.VITE_TREZOR_DEV;

try {
if (TREZOR_DEV)
TrezorConnect.init({
connectSrc: TREZOR_CONNECT_URL,
lazyLoad: true, // this param prevents iframe injection until a TrezorConnect.method is called
manifest: {
email: "[email protected]",
appUrl: "https://github.com/unchained-capital/unchained-wallets",
},
});
else
TrezorConnect.manifest({
email: "[email protected]",
TrezorConnect.init({
connectSrc: TREZOR_DEV
? TREZOR_CONNECT_URL
: "https://connect.trezor.io/9.1.9/", // pinning to this connect version to avoid backwards incompatible changes
lazyLoad: true, // this param prevents iframe injection until a TrezorConnect.method is called
manifest: {
email: "[email protected]",
appUrl: "https://github.com/unchained-capital/unchained-wallets",
});
},
});
} catch (e) {
// We hit this if we run this code outside of a browser, for example
// during unit testing.
Expand Down

0 comments on commit 5b256bf

Please sign in to comment.