Skip to content

Commit

Permalink
Build: (eb23934) Make walletConnect an optional connector (#158)
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Oct 2, 2024
1 parent 09c18f9 commit 6fd739a
Show file tree
Hide file tree
Showing 10 changed files with 40 additions and 37 deletions.
2 changes: 1 addition & 1 deletion assets/ccip-BD4-E_uZ.js → assets/ccip-XgLXf-gm.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { f as BaseError, h as getUrl, s as stringify, i as decodeErrorResult, j as isAddressEqual, k as call, l as concat, m as encodeAbiParameters, H as HttpRequestError, n as isHex } from "./index-CaRdSd9P.js";
import { f as BaseError, h as getUrl, s as stringify, i as decodeErrorResult, j as isAddressEqual, k as call, l as concat, m as encodeAbiParameters, H as HttpRequestError, n as isHex } from "./index-CWBAsnr3.js";
class OffchainLookupError extends BaseError {
constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
var _a;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { p as process$1, c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace } from "./index-CaRdSd9P.js";
import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-D3e42oki.js";
import { p as process$1, c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace } from "./index-CWBAsnr3.js";
import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-DgGu3QDl.js";
var readableBrowser = { exports: {} };
var streamBrowser = eventsExports.EventEmitter;
var buffer_list;
Expand Down
6 changes: 3 additions & 3 deletions assets/index-BT7PrVMP.js → assets/index-CGSWxPxs.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CaRdSd9P.js";
import { r as require$$0$1, e as eventsExports } from "./inherits_browser-D3e42oki.js";
import { s as sha_jsExports, a as require$$1$1, b as require$$2, r as require$$0$2, j as js } from "./hooks.module-BnzzsFhJ.js";
import { c as commonjsGlobal, B as Buffer, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CWBAsnr3.js";
import { r as require$$0$1, e as eventsExports } from "./inherits_browser-DgGu3QDl.js";
import { s as sha_jsExports, a as require$$1$1, b as require$$2, r as require$$0$2, j as js } from "./hooks.module-DwKr4YEl.js";
var dist$5 = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
39 changes: 21 additions & 18 deletions assets/index-CaRdSd9P.js → assets/index-CWBAsnr3.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-wr_HNsXy.js","./hooks.module-BnzzsFhJ.js","./inherits_browser-D3e42oki.js","./index-BT7PrVMP.js","./index.es-cfKIWXoD.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-D2U_GLHi.js","./hooks.module-DwKr4YEl.js","./inherits_browser-DgGu3QDl.js","./index-CGSWxPxs.js","./index.es-_Rk8O_FW.js"])))=>i.map(i=>d[i]);
var __defProp = Object.defineProperty;
var __typeError = (msg) => {
throw TypeError(msg);
Expand Down Expand Up @@ -32993,7 +32993,7 @@ async function call(client2, args) {
} catch (err) {
const data2 = getRevertErrorData(err);
const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-BD4-E_uZ.js");
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-XgLXf-gm.js");
return { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 };
}, true ? [] : void 0, import.meta.url);
if (client2.ccipRead !== false && (data2 == null ? void 0 : data2.slice(0, 10)) === offchainLookupSignature && to)
Expand Down Expand Up @@ -98461,7 +98461,7 @@ function version4(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-wr_HNsXy.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-D2U_GLHi.js").then((n2) => n2.i);
return { default: SDK2 };
}, true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
if (typeof SDK !== "function" && typeof SDK.default === "function")
Expand Down Expand Up @@ -98643,7 +98643,7 @@ function version3(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-BT7PrVMP.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-CGSWxPxs.js").then((n2) => n2.i);
return { default: SDK2 };
}, true ? __vite__mapDeps([3,2,1]) : void 0, import.meta.url);
if (typeof SDK !== "function" && typeof SDK.default === "function")
Expand Down Expand Up @@ -98879,7 +98879,7 @@ function walletConnect$1(parameters) {
if (!optionalChains.length)
return;
const { EthereumProvider } = await __vitePreload(async () => {
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-cfKIWXoD.js");
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-_Rk8O_FW.js");
return { EthereumProvider: EthereumProvider2 };
}, true ? __vite__mapDeps([4,2]) : void 0, import.meta.url);
return await EthereumProvider.init({
Expand Down Expand Up @@ -99327,7 +99327,7 @@ const getDefaultConnectors = (walletType2, options) => {
return getDefaultUniversalConnectors(options);
}
};
const getDefaultWaasConnectors = ({ appName, projectAccessKey: projectAccessKey2, walletConnectProjectId: walletConnectProjectId2, defaultChainId, waasConfigKey, googleClientId, appleClientId, appleRedirectURI, enableConfirmationModal, legacyEmailAuth = false, isDev = false }) => {
const getDefaultWaasConnectors = ({ appName, projectAccessKey: projectAccessKey2, defaultChainId, walletConnectProjectId: walletConnectProjectId2, waasConfigKey, googleClientId, appleClientId, appleRedirectURI, enableConfirmationModal, legacyEmailAuth = false, isDev = false }) => {
const wallets = [
emailWaas({
projectAccessKey: projectAccessKey2,
Expand All @@ -99339,11 +99339,13 @@ const getDefaultWaasConnectors = ({ appName, projectAccessKey: projectAccessKey2
}),
coinbaseWallet({
appName
}),
walletConnect({
projectId: walletConnectProjectId2
})
];
if (walletConnectProjectId2) {
wallets.push(walletConnect({
projectId: walletConnectProjectId2
}));
}
if (googleClientId) {
wallets.push(googleWaas({
projectAccessKey: projectAccessKey2,
Expand All @@ -99365,11 +99367,10 @@ const getDefaultWaasConnectors = ({ appName, projectAccessKey: projectAccessKey2
isDev
}));
}
const connectors = getKitConnectWallets(projectAccessKey2, wallets);
return connectors;
return getKitConnectWallets(projectAccessKey2, wallets);
};
const getDefaultUniversalConnectors = ({ appName, projectAccessKey: projectAccessKey2, walletConnectProjectId: walletConnectProjectId2, defaultChainId }) => {
const connectors = getKitConnectWallets(projectAccessKey2, [
const getDefaultUniversalConnectors = ({ appName, projectAccessKey: projectAccessKey2, defaultChainId, walletConnectProjectId: walletConnectProjectId2 }) => {
const wallets = [
email({
defaultNetwork: defaultChainId,
connect: {
Expand Down Expand Up @@ -99405,12 +99406,14 @@ const getDefaultUniversalConnectors = ({ appName, projectAccessKey: projectAcces
connect: {
app: appName
}
}),
walletConnect({
projectId: walletConnectProjectId2
})
]);
return connectors;
];
if (walletConnectProjectId2) {
wallets.push(walletConnect({
projectId: walletConnectProjectId2
}));
}
return getKitConnectWallets(projectAccessKey2, wallets);
};
const getDefaultTransports = (chains2) => {
return Object.fromEntries(chains2.map((chain) => [chain.id, http()]));
Expand Down
4 changes: 2 additions & 2 deletions assets/index-C_hKV8dq.js → assets/index-Ct_CIen2.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { n as ne$1, s as se$1, T as T$2, t as te$1, a as a$2, o as oe$1, R as R$1, p as p$1, y as y$1 } from "./index-Dh05DiNn.js";
import "./index-CaRdSd9P.js";
import { n as ne$1, s as se$1, T as T$2, t as te$1, a as a$2, o as oe$1, R as R$1, p as p$1, y as y$1 } from "./index-Mv20QOIl.js";
import "./index-CWBAsnr3.js";
function addUniqueItem(array, item) {
array.indexOf(item) === -1 && array.push(item);
}
Expand Down
4 changes: 2 additions & 2 deletions assets/index-wr_HNsXy.js → assets/index-D2U_GLHi.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { B as Buffer, c as commonjsGlobal, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CaRdSd9P.js";
import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-BnzzsFhJ.js";
import { B as Buffer, c as commonjsGlobal, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-CWBAsnr3.js";
import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-DwKr4YEl.js";
var dist = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
6 changes: 3 additions & 3 deletions assets/index-Dh05DiNn.js → assets/index-Mv20QOIl.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-C_hKV8dq.js","./index-CaRdSd9P.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { _ as __vitePreload } from "./index-CaRdSd9P.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Ct_CIen2.js","./index-CWBAsnr3.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { _ as __vitePreload } from "./index-CWBAsnr3.js";
const t = Symbol();
const s = Object.getPrototypeOf, c$1 = /* @__PURE__ */ new WeakMap(), l = (e) => e && (c$1.has(e) ? c$1.get(e) : s(e) === Object.prototype || s(e) === Array.prototype), y$1 = (e) => l(e) && e[t] || null, h = (e, t2 = true) => {
c$1.set(e, t2);
Expand Down Expand Up @@ -472,7 +472,7 @@ class d {
}
async initUi() {
if (typeof window < "u") {
await __vitePreload(() => import("./index-C_hKV8dq.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
await __vitePreload(() => import("./index-Ct_CIen2.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const e = document.createElement("wcm-modal");
document.body.insertAdjacentElement("beforeend", e), p.setIsUiLoaded(true);
}
Expand Down
8 changes: 4 additions & 4 deletions assets/index.es-cfKIWXoD.js → assets/index.es-_Rk8O_FW.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Dh05DiNn.js","./index-CaRdSd9P.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, b as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-CaRdSd9P.js";
import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, G as Gg } from "./inherits_browser-D3e42oki.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-Mv20QOIl.js","./index-CWBAsnr3.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, b as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-CWBAsnr3.js";
import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, G as Gg } from "./inherits_browser-DgGu3QDl.js";
var __spreadArray = function(to2, from2, pack) {
if (pack || arguments.length === 2) for (var i3 = 0, l2 = from2.length, ar2; i3 < l2; i3++) {
if (ar2 || !(i3 in from2)) {
Expand Down Expand Up @@ -27392,7 +27392,7 @@ class C2 {
if (this.rpc = this.getRpcConfig(t), this.chainId = this.rpc.chains.length ? m2(this.rpc.chains) : m2(this.rpc.optionalChains), this.signer = await Iv.init({ projectId: this.rpc.projectId, metadata: this.rpc.metadata, disableProviderPing: t.disableProviderPing, relayUrl: t.relayUrl, storageOptions: t.storageOptions, customStoragePrefix: t.customStoragePrefix, telemetryEnabled: t.telemetryEnabled }), this.registerEventListeners(), await this.loadPersistedSession(), this.rpc.showQrModal) {
let s2;
try {
const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-Dh05DiNn.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-Mv20QOIl.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
s2 = i3;
} catch {
throw new Error("To use QR modal, please install @walletconnect/modal package");
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, d as dist } from "./index-CaRdSd9P.js";
import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, d as dist } from "./index-CWBAsnr3.js";
var events = { exports: {} };
var R = typeof Reflect === "object" ? Reflect : null;
var ReflectApply = R && typeof R.apply === "function" ? R.apply : function ReflectApply2(target, receiver, args) {
Expand Down
2 changes: 1 addition & 1 deletion index.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
Learn how to configure a non-root public URL by running `npm run build`.
-->
<title>Sequence Kit Demo</title>
<script type="module" crossorigin src="./assets/index-CaRdSd9P.js"></script>
<script type="module" crossorigin src="./assets/index-CWBAsnr3.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-g_cLYwVj.css">
</head>
<body>
Expand Down

0 comments on commit 6fd739a

Please sign in to comment.