Skip to content

Commit

Permalink
Build: (b5ae864) Fix email conflict listeners (#212)
Browse files Browse the repository at this point in the history
  • Loading branch information
corbanbrook committed Dec 10, 2024
1 parent 094f387 commit 6be6de8
Show file tree
Hide file tree
Showing 11 changed files with 40 additions and 32 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-BOlNdlpL.js";
import { a as getAugmentedNamespace, h as dist, g as getDefaultExportFromCjs } from "./index-Di7cRPwo.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-Dp6_mCKG.js → assets/browser-Dyhk7Xcn.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-BOlNdlpL.js";
import { p as process$1, g as getDefaultExportFromCjs } from "./index-Di7cRPwo.js";
var browser = { exports: {} };
var ms;
var hasRequiredMs;
Expand Down
2 changes: 1 addition & 1 deletion assets/ccip-AmIq9whm.js → assets/ccip-DckmT5jM.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-BOlNdlpL.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-Di7cRPwo.js";
class OffchainLookupError extends BaseError {
constructor({ callbackSelector, cause, data, extraData, sender, urls }) {
var _a;
Expand Down
6 changes: 3 additions & 3 deletions assets/index-CUK_7sE0.js → assets/index-BPG9DLVF.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-BOlNdlpL.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-Yaptyi5V.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-Di7cRPwo.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-CY0QmDOt.js";
import { a as clsx_m } from "./clsx.m-D57qXwfE.js";
import { b as browserExports } from "./browser-Dp6_mCKG.js";
import { b as browserExports } from "./browser-Dyhk7Xcn.js";
var dist$5 = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
2 changes: 1 addition & 1 deletion assets/index-DbSNs4we.js → assets/index-C9_cJstJ.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-BOlNdlpL.js";
import { B as Buffer, g as getDefaultExportFromCjs, b as bytesToHex, s as sha256, E as EventEmitter } from "./index-Di7cRPwo.js";
import { c as clsx } from "./clsx.m-D57qXwfE.js";
class ScopedLocalStorage {
constructor(scope, module) {
Expand Down
34 changes: 21 additions & 13 deletions assets/index-BOlNdlpL.js → assets/index-Di7cRPwo.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-DbSNs4we.js","./clsx.m-D57qXwfE.js","./index-CUK_7sE0.js","./___vite-browser-external_commonjs-proxy-Yaptyi5V.js","./browser-Dp6_mCKG.js","./metamask-sdk-DMs0VE6e.js","./index.es-DEust1qg.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-C9_cJstJ.js","./clsx.m-D57qXwfE.js","./index-BPG9DLVF.js","./___vite-browser-external_commonjs-proxy-CY0QmDOt.js","./browser-Dyhk7Xcn.js","./metamask-sdk-DXg7Ygil.js","./index.es-DazplGaq.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 (err) {
const data2 = getRevertErrorData(err);
const { offchainLookup, offchainLookupSignature } = await __vitePreload(async () => {
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-AmIq9whm.js");
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-DckmT5jM.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 @@ -96951,16 +96951,18 @@ const useEmailConflict = () => {
const forceCreateFuncRef = reactExports.useRef(null);
const [isOpen, toggleModal] = reactExports.useState(false);
const [emailConflictInfo, setEmailConflictInfo] = reactExports.useState(null);
const waasConnector = connectors.find((connector) => !!connector.sequenceWaas);
const waas = waasConnector == null ? void 0 : waasConnector.sequenceWaas;
const waasConnectors = connectors.filter((connector) => !!connector.sequenceWaas);
const waasInstances = waasConnectors.map((connector) => connector.sequenceWaas);
reactExports.useEffect(() => {
if (waas) {
const disposer = waas.onEmailConflict(async (info, forceCreate) => {
if (waasInstances.length > 0) {
const disposers = waasInstances.map((waas) => waas.onEmailConflict(async (info, forceCreate) => {
forceCreateFuncRef.current = forceCreate;
setEmailConflictInfo(info);
toggleModal(true);
});
return disposer;
}));
return () => {
disposers.forEach((disposer) => disposer());
};
}
}, []);
return {
Expand Down Expand Up @@ -99246,7 +99248,13 @@ const KitProvider = (props) => {
rejectPendingRequest(pendingRequestConfirmation == null ? void 0 : pendingRequestConfirmation.id);
} }), jsxRuntimeExports$1.jsx(Button, { alignItems: "center", textAlign: "center", width: "full", shape: "square", size: "lg", label: "Confirm", variant: "primary", onClick: () => {
confirmPendingRequest(pendingRequestConfirmation == null ? void 0 : pendingRequestConfirmation.id);
} })] })] }), jsxRuntimeExports$1.jsx(PoweredBySequence, {})] }) }), isEmailConflictOpen && emailConflictInfo && jsxRuntimeExports$1.jsx(Modal, { size: "sm", scroll: false, onClose: () => toggleEmailConflictModal(false), children: jsxRuntimeExports$1.jsxs(Box, { padding: "4", children: [jsxRuntimeExports$1.jsx(index$2$1.Title, { asChild: true, children: jsxRuntimeExports$1.jsx(PageHeading, { children: "Email already in use" }) }), jsxRuntimeExports$1.jsxs(Box, { children: [jsxRuntimeExports$1.jsxs(Text, { variant: "normal", color: "text80", textAlign: "center", children: ["Another account with this email address ", jsxRuntimeExports$1.jsxs(Text, { color: "text100", children: ["(", emailConflictInfo.email, ")"] }), " ", "already exists with account type ", jsxRuntimeExports$1.jsxs(Text, { color: "text100", children: ["(", emailConflictInfo.type, ")"] }), ". Please sign in again with the correct account."] }), jsxRuntimeExports$1.jsx(Box, { marginTop: "4", gap: "2", alignItems: "center", justifyContent: "center", children: jsxRuntimeExports$1.jsx(Button, { label: "OK", onClick: () => toggleEmailConflictModal(false) }) })] })] }) })] }) }) }), children] }) }) }) }) }) });
} })] })] }), jsxRuntimeExports$1.jsx(PoweredBySequence, {})] }) }), isEmailConflictOpen && emailConflictInfo && jsxRuntimeExports$1.jsx(Modal, { size: "sm", scroll: false, onClose: () => {
setOpenConnectModal(false);
toggleEmailConflictModal(false);
}, children: jsxRuntimeExports$1.jsxs(Box, { padding: "4", children: [jsxRuntimeExports$1.jsx(index$2$1.Title, { asChild: true, children: jsxRuntimeExports$1.jsx(PageHeading, { children: "Email already in use" }) }), jsxRuntimeExports$1.jsxs(Box, { children: [jsxRuntimeExports$1.jsxs(Text, { variant: "normal", color: "text80", textAlign: "center", children: ["Another account with this email address ", jsxRuntimeExports$1.jsxs(Text, { color: "text100", children: ["(", emailConflictInfo.email, ")"] }), " ", "already exists with account type ", jsxRuntimeExports$1.jsxs(Text, { color: "text100", children: ["(", emailConflictInfo.type, ")"] }), ". Please sign in again with the correct account."] }), jsxRuntimeExports$1.jsx(Box, { marginTop: "4", gap: "2", alignItems: "center", justifyContent: "center", children: jsxRuntimeExports$1.jsx(Button, { label: "OK", onClick: () => {
setOpenConnectModal(false);
toggleEmailConflictModal(false);
} }) })] })] }) })] }) }) }), children] }) }) }) }) }) });
};
const defaultQueryClient = new QueryClient();
const SequenceKit = (props) => {
Expand Down Expand Up @@ -99415,7 +99423,7 @@ function version4(parameters) {
};
})();
const { createCoinbaseWalletSDK } = await __vitePreload(async () => {
const { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 } = await import("./index-DbSNs4we.js");
const { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 } = await import("./index-C9_cJstJ.js");
return { createCoinbaseWalletSDK: createCoinbaseWalletSDK2 };
}, true ? __vite__mapDeps([0,1]) : void 0, import.meta.url);
const sdk = createCoinbaseWalletSDK({
Expand Down Expand Up @@ -99590,7 +99598,7 @@ function version3(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-CUK_7sE0.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-BPG9DLVF.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 @@ -99830,7 +99838,7 @@ function metaMask$1(parameters = {}) {
var _a2;
const MetaMaskSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./metamask-sdk-DMs0VE6e.js");
const { default: SDK2 } = await import("./metamask-sdk-DXg7Ygil.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 @@ -100188,7 +100196,7 @@ function walletConnect$1(parameters) {
if (!optionalChains.length)
return;
const { EthereumProvider } = await __vitePreload(async () => {
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-DEust1qg.js");
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-DazplGaq.js");
return { EthereumProvider: EthereumProvider2 };
}, true ? __vite__mapDeps([6,3]) : void 0, import.meta.url);
return await EthereumProvider.init({
Expand Down
6 changes: 3 additions & 3 deletions assets/index-gBh6uBpH.js → assets/index-PHecIkIw.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-CzgCZ4p_.js","./index-BOlNdlpL.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { B as Buffer, _ as __vitePreload } from "./index-BOlNdlpL.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-ZjatgEg2.js","./index-Di7cRPwo.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { B as Buffer, _ as __vitePreload } from "./index-Di7cRPwo.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-CzgCZ4p_.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
await __vitePreload(() => import("./index-ZjatgEg2.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
4 changes: 2 additions & 2 deletions assets/index-CzgCZ4p_.js → assets/index-ZjatgEg2.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-gBh6uBpH.js";
import "./index-BOlNdlpL.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-PHecIkIw.js";
import "./index-Di7cRPwo.js";
function addUniqueItem(array, item) {
array.indexOf(item) === -1 && array.push(item);
}
Expand Down
8 changes: 4 additions & 4 deletions assets/index.es-DEust1qg.js → assets/index.es-DazplGaq.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-gBh6uBpH.js","./index-BOlNdlpL.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-BOlNdlpL.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-Yaptyi5V.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-PHecIkIw.js","./index-Di7cRPwo.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-Di7cRPwo.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-CY0QmDOt.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-gBh6uBpH.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-PHecIkIw.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-BOlNdlpL.js";
import { t } from "./browser-Dp6_mCKG.js";
import { c as commonjsGlobal, g as getDefaultExportFromCjs, n, d as global, f as eventemitter2Exports, _ as __vitePreload } from "./index-Di7cRPwo.js";
import { t } from "./browser-Dyhk7Xcn.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-BOlNdlpL.js"></script>
<script type="module" crossorigin src="./assets/index-Di7cRPwo.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-g_cLYwVj.css">
</head>
<body>
Expand Down

0 comments on commit 6be6de8

Please sign in to comment.