Skip to content

Commit

Permalink
fix: firefox connection error
Browse files Browse the repository at this point in the history
  • Loading branch information
alecande11 committed Apr 13, 2022
1 parent f4137c2 commit 27ea997
Showing 1 changed file with 0 additions and 17 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import {
} from '@terra-money/web-extension-interface';
import { CreateTxOptions } from '@terra-money/terra.js';
import { BehaviorSubject, Subscribable } from 'rxjs';
import { isDesktopChrome } from '../../utils/browser-check';
import { LegacyExtensionConnector } from '../legacy-extension';
import { selectModal } from './modal';
import { ExtensionInfo, getTerraExtensions } from './multiChannel';
Expand Down Expand Up @@ -44,17 +43,7 @@ export class ExtensionRouter {

private _connector: TerraWebExtensionConnector | null = null;

private readonly isDesktopChrome: boolean;

constructor(private readonly options: ExtensionRouterOptions) {
this.isDesktopChrome =
typeof window !== 'undefined' &&
isDesktopChrome(
options.dangerously__chromeExtensionCompatibleBrowserCheck?.(
navigator.userAgent,
) ?? false,
);

this._states = new BehaviorSubject<ExtensionRouterStates>({
type: ExtensionRouterStatus.INITIALIZING,
network: options.defaultNetwork,
Expand Down Expand Up @@ -297,12 +286,6 @@ export class ExtensionRouter {
private createConnector = (extensionInfo: ExtensionInfo) => {
this._connector?.close();

if (!extensionInfo.connector) {
throw new Error(
`[ExtensionRouter] Legacy extension only support the desktop chrome and firefox`,
);
}

const connectorPromise: Promise<TerraWebExtensionConnector> =
extensionInfo.connector
? Promise.resolve(extensionInfo.connector())
Expand Down

0 comments on commit 27ea997

Please sign in to comment.