Skip to content

Commit fa2e553

Browse files
committed
fix: use default export only for bowser, vite otherwise cannot parse imports
Signed-off-by: Chris Campbell <chris@launchbadge.com>
1 parent 805eeae commit fa2e553

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

packages/ui/src/components/WalletConnect.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import { IWalletConnectExtensionAdapter } from "@web3auth/base";
2-
import bowser, { OS_MAP, PLATFORMS_MAP } from "bowser";
2+
import bowser from "bowser";
33
import { memo, useEffect, useMemo, useState } from "react";
44
import QRCode from "react-qr-code";
55

@@ -47,7 +47,7 @@ function formatMobileRegistryEntry(
4747
logo: entry.logo || "",
4848
universalLink,
4949
deepLink,
50-
href: os === OS_MAP.iOS ? formatIOSMobile({ uri: walletConnectUri, universalLink, deepLink }) : walletConnectUri,
50+
href: os === bowser.OS_MAP.iOS ? formatIOSMobile({ uri: walletConnectUri, universalLink, deepLink }) : walletConnectUri,
5151
};
5252
}
5353

@@ -72,7 +72,7 @@ function WalletConnect(props: WalletConnectProps) {
7272
}, [window.navigator.userAgent]);
7373

7474
useEffect(() => {
75-
if (deviceDetails.platform === PLATFORMS_MAP.mobile) {
75+
if (deviceDetails.platform === bowser.PLATFORMS_MAP.mobile) {
7676
const mobileLinks = formatMobileRegistry(wcAdapters, walletConnectUri, deviceDetails.os, deviceDetails.platform);
7777
setLinks(mobileLinks);
7878
}
@@ -83,11 +83,11 @@ function WalletConnect(props: WalletConnectProps) {
8383
<div className="w3ajs-wallet-connect w3a-wallet-connect">
8484
<div
8585
className={`w3ajs-wallet-connect__container w3a-wallet-connect__container${
86-
deviceDetails.os === OS_MAP.Android ? " w3a-wallet-connect__container--android" : ""
86+
deviceDetails.os === bowser.OS_MAP.Android ? " w3a-wallet-connect__container--android" : ""
8787
}`}
8888
>
8989
<div className="w3a-wallet-connect__logo">{walletConnectIcon}</div>
90-
{deviceDetails.platform === PLATFORMS_MAP.desktop ? (
90+
{deviceDetails.platform === bowser.PLATFORMS_MAP.desktop ? (
9191
<div className="w3a-wallet-connect__container-desktop">
9292
<div>Scan QR code with a WalletConnect-compatible wallet</div>
9393
<div className="w3ajs-wallet-connect-qr w3a-wallet-connect-qr">
@@ -97,7 +97,7 @@ function WalletConnect(props: WalletConnectProps) {
9797
) : (
9898
<div className="w3a-wallet-connect__container-btn-group">
9999
{links.map((link) => {
100-
return deviceDetails.os === OS_MAP.iOS ? (
100+
return deviceDetails.os === bowser.OS_MAP.iOS ? (
101101
<div className="w3a-wallet-connect__container-ios">
102102
<a key={link.name} href={link.href} rel="noopener noreferrer" target="_blank">
103103
<button type="button" className="w3a-button w3a-button--icon">

0 commit comments

Comments
 (0)