Skip to content

Commit

Permalink
Build: (975f18f) Do not throw error if waas connector is not found (#219
Browse files Browse the repository at this point in the history
)
  • Loading branch information
corbanbrook committed Dec 17, 2024
1 parent abaa77c commit 8942b26
Show file tree
Hide file tree
Showing 11 changed files with 35 additions and 27 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { a as getAugmentedNamespace, h as dist, g as getDefaultExportFromCjs } from "./index-C1SjSLmA.js";
import { a as getAugmentedNamespace, h as dist, g as getDefaultExportFromCjs } from "./index-Bz6lSYJX.js";
const require$$0$1 = /* @__PURE__ */ getAugmentedNamespace(dist);
var inherits_browser = { exports: {} };
if (typeof Object.create === "function") {
Expand Down
2 changes: 1 addition & 1 deletion assets/browser-BsrK5m4C.js → assets/browser-B-OtOpdq.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { p as process$1, g as getDefaultExportFromCjs } from "./index-C1SjSLmA.js";
import { p as process$1, g as getDefaultExportFromCjs } from "./index-Bz6lSYJX.js";
var browser = { exports: {} };
var ms;
var hasRequiredMs;
Expand Down
2 changes: 1 addition & 1 deletion assets/ccip-BMO0LA0d.js → assets/ccip-l9l53lsO.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { i as BaseError, j as getUrl, k as stringify, l as decodeErrorResult, m as isAddressEqual, o as call, q as concat, r as encodeAbiParameters, H as HttpRequestError, u as isHex } from "./index-C1SjSLmA.js";
import { i as BaseError, j as getUrl, k as stringify, l as decodeErrorResult, m as isAddressEqual, o as call, q as concat, r as encodeAbiParameters, H as HttpRequestError, u as isHex } from "./index-Bz6lSYJX.js";
class OffchainLookupError extends BaseError {
constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
var _a;
Expand Down
4 changes: 2 additions & 2 deletions assets/index-DiRSBp0V.js → assets/index-BKXYFDMP.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { T as ThemeCtrl, M as ModalCtrl, R as RouterCtrl, E as ExplorerCtrl, C as CoreUtil, a as ToastCtrl, b as EventsCtrl, O as OptionsCtrl, c as ConfigCtrl } from "./index-BjN8zAHE.js";
import "./index-C1SjSLmA.js";
import { T as ThemeCtrl, M as ModalCtrl, R as RouterCtrl, E as ExplorerCtrl, C as CoreUtil, a as ToastCtrl, b as EventsCtrl, O as OptionsCtrl, c as ConfigCtrl } from "./index-aTWHqh2Q.js";
import "./index-Bz6lSYJX.js";
function addUniqueItem(array, item) {
array.indexOf(item) === -1 && array.push(item);
}
Expand Down
24 changes: 16 additions & 8 deletions assets/index-C1SjSLmA.js → assets/index-Bz6lSYJX.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-DF20gIsG.js","./hooks.module-C1UUl86a.js","./index-Dlx0r4Hc.js","./___vite-browser-external_commonjs-proxy-DCQ1jgJw.js","./browser-BsrK5m4C.js","./metamask-sdk-CrAgzNC4.js","./index.es-oHTfwTsx.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-_4BQKw73.js","./hooks.module-C1UUl86a.js","./index-C83ZGPeY.js","./___vite-browser-external_commonjs-proxy-DSgSqwRJ.js","./browser-B-OtOpdq.js","./metamask-sdk-DwqO51gs.js","./index.es-BvVMA_9W.js"])))=>i.map(i=>d[i]);
var __defProp = Object.defineProperty;
var __typeError = (msg) => {
throw TypeError(msg);
Expand Down Expand Up @@ -32949,7 +32949,7 @@ async function call(client2, args) {
} catch (err2) {
const data2 = getRevertErrorData(err2);
const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-BMO0LA0d.js");
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-l9l53lsO.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 @@ -100205,7 +100205,7 @@ function version4(parameters) {
};
})();
const { createCoinbaseWalletSDK } = await __vitePreload(async () => {
const { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 } = await import("./index-DF20gIsG.js");
const { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 } = await import("./index-_4BQKw73.js");
return { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 };
}, true ? __vite__mapDeps([0,1]) : void 0, import.meta.url);
const sdk = createCoinbaseWalletSDK({
Expand Down Expand Up @@ -100380,7 +100380,7 @@ function version3(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-Dlx0r4Hc.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-C83ZGPeY.js").then((n2) => n2.i);
return { default: SDK2 };
}, true ? __vite__mapDeps([2,3,1,4]) : void 0, import.meta.url);
if (typeof SDK !== "function" && typeof SDK.default === "function")
Expand Down Expand Up @@ -100620,7 +100620,7 @@ function metaMask$1(parameters = {}) {
var _a2;
const MetaMaskSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./metamask-sdk-CrAgzNC4.js");
const { default: SDK2 } = await import("./metamask-sdk-DwqO51gs.js");
return { default: SDK2 };
}, true ? __vite__mapDeps([5,4]) : void 0, import.meta.url);
if (typeof SDK !== "function" && typeof SDK.default === "function")
Expand Down Expand Up @@ -100978,7 +100978,7 @@ function walletConnect$1(parameters) {
if (!optionalChains.length)
return;
const { EthereumProvider } = await __vitePreload(async () => {
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-oHTfwTsx.js");
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-BvVMA_9W.js");
return { EthereumProvider: EthereumProvider2 };
}, true ? __vite__mapDeps([6,3]) : void 0, import.meta.url);
return await EthereumProvider.init({
Expand Down Expand Up @@ -101823,11 +101823,19 @@ function useCheckWaasFeeOptions() {
const waasConnector = (_a2 = connections.find((c2) => c2.connector.id.includes("waas"))) == null ? void 0 : _a2.connector;
return async ({ transactions: transactions2, chainId }) => {
if (!waasConnector) {
throw new Error("WaaS connector not found");
return {
feeQuote: void 0,
feeOptions: void 0,
isSponsored: true
};
}
const waasProvider = waasConnector.sequenceWaasProvider;
if (!waasProvider) {
throw new Error("WaaS provider not found");
return {
feeQuote: void 0,
feeOptions: void 0,
isSponsored: true
};
}
return waasProvider.checkTransactionFeeOptions({ transactions: transactions2, chainId });
};
Expand Down
6 changes: 3 additions & 3 deletions assets/index-Dlx0r4Hc.js → assets/index-C83ZGPeY.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-C1SjSLmA.js";
import { r as require$$0$2, i as inherits_browserExports, e as eventsExports, a as require$$0$3 } from "./___vite-browser-external_commonjs-proxy-DCQ1jgJw.js";
import { c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace, p as process$1, t as tslib_es6, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-Bz6lSYJX.js";
import { r as require$$0$2, i as inherits_browserExports, e as eventsExports, a as require$$0$3 } from "./___vite-browser-external_commonjs-proxy-DSgSqwRJ.js";
import { p as preact_module, a as clsx_m, b as hooks_module } from "./hooks.module-C1UUl86a.js";
import { b as browserExports } from "./browser-BsrK5m4C.js";
import { b as browserExports } from "./browser-B-OtOpdq.js";
var dist$5 = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
2 changes: 1 addition & 1 deletion assets/index-DF20gIsG.js → assets/index-_4BQKw73.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { B as Buffer, g as getDefaultExportFromCjs, b as bytesToHex, s as sha256, E as EventEmitter } from "./index-C1SjSLmA.js";
import { B as Buffer, g as getDefaultExportFromCjs, b as bytesToHex, s as sha256, E as EventEmitter } from "./index-Bz6lSYJX.js";
import { D, g, c as clsx, h, y } from "./hooks.module-C1UUl86a.js";
class ScopedLocalStorage {
constructor(scope, module) {
Expand Down
6 changes: 3 additions & 3 deletions assets/index-BjN8zAHE.js → assets/index-aTWHqh2Q.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-DiRSBp0V.js","./index-C1SjSLmA.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { B as Buffer, _ as __vitePreload } from "./index-C1SjSLmA.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-BKXYFDMP.js","./index-Bz6lSYJX.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { B as Buffer, _ as __vitePreload } from "./index-Bz6lSYJX.js";
const t = Symbol();
const s = Object.getPrototypeOf, c = /* @__PURE__ */ new WeakMap(), l = (e) => e && (c.has(e) ? c.get(e) : s(e) === Object.prototype || s(e) === Array.prototype), y = (e) => l(e) && e[t] || null, h = (e, t2 = true) => {
c.set(e, t2);
Expand Down Expand Up @@ -789,7 +789,7 @@ class WalletConnectModal {
}
async initUi() {
if (typeof window !== "undefined") {
await __vitePreload(() => import("./index-DiRSBp0V.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
await __vitePreload(() => import("./index-BKXYFDMP.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const modal = document.createElement("wcm-modal");
document.body.insertAdjacentElement("beforeend", modal);
OptionsCtrl.setIsUiLoaded(true);
Expand Down
8 changes: 4 additions & 4 deletions assets/index.es-oHTfwTsx.js → assets/index.es-BvVMA_9W.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-BjN8zAHE.js","./index-C1SjSLmA.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, d as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-C1SjSLmA.js";
import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, J as Jg } from "./___vite-browser-external_commonjs-proxy-DCQ1jgJw.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-aTWHqh2Q.js","./index-Bz6lSYJX.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { p as process$1, a as getAugmentedNamespace, c as commonjsGlobal, d as global, B as Buffer, g as getDefaultExportFromCjs, _ as __vitePreload } from "./index-Bz6lSYJX.js";
import { a as require$$0$2, r as require$$0$3, i as inherits_browserExports, e as eventsExports, J as Jg } from "./___vite-browser-external_commonjs-proxy-DSgSqwRJ.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 @@ -27477,7 +27477,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 Ev.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-BjN8zAHE.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-aTWHqh2Q.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,5 +1,5 @@
import { c as commonjsGlobal, g as getDefaultExportFromCjs, n, d as global, f as eventemitter2Exports, _ as __vitePreload } from "./index-C1SjSLmA.js";
import { t } from "./browser-BsrK5m4C.js";
import { c as commonjsGlobal, g as getDefaultExportFromCjs, n, d as global, f as eventemitter2Exports, _ as __vitePreload } from "./index-Bz6lSYJX.js";
import { t } from "./browser-B-OtOpdq.js";
var browserPonyfill = { exports: {} };
(function(module, exports) {
var __global__ = typeof globalThis !== "undefined" && globalThis || typeof self !== "undefined" && self || typeof commonjsGlobal !== "undefined" && commonjsGlobal;
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-C1SjSLmA.js"></script>
<script type="module" crossorigin src="./assets/index-Bz6lSYJX.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-g_cLYwVj.css">
</head>
<body>
Expand Down

0 comments on commit 8942b26

Please sign in to comment.