Skip to content

Commit

Permalink
fix: separate catch block
Browse files Browse the repository at this point in the history
  • Loading branch information
kyranjamie authored and fbwoolf committed Feb 14, 2024
1 parent 81fea0d commit 52a849a
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/inpage/inpage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -305,13 +305,22 @@ try {
get: () => warnAboutDeprecatedProvider(provider),
set: () => {},
});
} catch (e) {}

try {
Object.defineProperty(window, 'HiroWalletProvider', {
get: () => warnAboutDeprecatedProvider(provider),
set: () => {},
});
Object.defineProperty(window, 'LeatherProvider', { get: () => provider, set: () => {} });
} catch (e) {}

try {
Object.defineProperty(window, 'LeatherProvider', { get: () => provider, set: () => {} });
} catch (e) {
// eslint-disable-next-line no-console
console.warn('Unable to set LeatherProvider');
}

// Legacy product provider objects
if (typeof window.btc === 'undefined') {
(window as any).btc = warnAboutDeprecatedProvider(provider);
Expand Down

0 comments on commit 52a849a

Please sign in to comment.