Skip to content

Commit

Permalink
Build: (ef6f523) Added useSignInEmail hook and store universal email (#…
Browse files Browse the repository at this point in the history
…181)

* Added useSignInEmail hook and store universal email

* Deprecate useWaasSignInEmail in favor of useSignInEmail

* Removing console.log
  • Loading branch information
corbanbrook committed Oct 30, 2024
1 parent 1296f31 commit 41c53fd
Show file tree
Hide file tree
Showing 10 changed files with 29 additions and 25 deletions.
2 changes: 1 addition & 1 deletion assets/ccip-BhLzpyIr.js → assets/ccip-BYHFtqVR.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-BzoDQi9E.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-C2oeUtnd.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-BzoDQi9E.js";
import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-B3kpC5sG.js";
import { p as process$1, c as commonjsGlobal, B as Buffer$7, a as getAugmentedNamespace } from "./index-C2oeUtnd.js";
import { e as eventsExports, r as require$$0$1, a as require$$0$2, i as inherits_browserExports } from "./inherits_browser-DDgf63Lc.js";
var readableBrowser = { exports: {} };
var streamBrowser = eventsExports.EventEmitter;
var buffer_list;
Expand Down
16 changes: 10 additions & 6 deletions assets/index-BzoDQi9E.js → assets/index-C2oeUtnd.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-C_8sCIH9.js","./hooks.module-Csgbk6Vf.js","./inherits_browser-B3kpC5sG.js","./index-Bt2RUJ5M.js","./index.es-DR9z2nHW.js"])))=>i.map(i=>d[i]);
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-dFSvgbvM.js","./hooks.module-BtdrwyMn.js","./inherits_browser-DDgf63Lc.js","./index-Lo0rLHIQ.js","./index.es-CXcCbixk.js"])))=>i.map(i=>d[i]);
var __defProp = Object.defineProperty;
var __typeError = (msg) => {
throw TypeError(msg);
Expand Down Expand Up @@ -32961,7 +32961,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-BhLzpyIr.js");
const { offchainLookup: offchainLookup2, offchainLookupSignature: offchainLookupSignature2 } = await import("./ccip-BYHFtqVR.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 @@ -97236,13 +97236,14 @@ function sequenceWallet(params) {
});
},
async connect() {
var _a2, _b2, _c2, _d2, _e2;
var _a2, _b2, _c2, _d2, _e2, _f2;
const provider2 = await this.getProvider();
if (!provider2.isConnected()) {
const localStorageTheme = await ((_a2 = config2.storage) == null ? void 0 : _a2.getItem(LocalStorageKey.Theme));
const ethAuthSettings = await ((_b2 = config2.storage) == null ? void 0 : _b2.getItem(LocalStorageKey.EthAuthSettings)) ?? {};
const connectOptionsWithTheme = {
authorize: true,
askForEmail: true,
...ethAuthSettings,
...connect2,
settings: {
Expand All @@ -97266,6 +97267,7 @@ function sequenceWallet(params) {
};
await ((_e2 = config2.storage) == null ? void 0 : _e2.setItem(LocalStorageKey.EthAuthProof, jsonEthAuthProof));
}
await ((_f2 = config2.storage) == null ? void 0 : _f2.setItem(LocalStorageKey.WaasSignInEmail, e2.email || null));
}
const accounts = await this.getAccounts();
return {
Expand All @@ -97274,8 +97276,10 @@ function sequenceWallet(params) {
};
},
async disconnect() {
var _a2;
const provider2 = await this.getProvider();
provider2.disconnect();
await ((_a2 = config2.storage) == null ? void 0 : _a2.removeItem(LocalStorageKey.WaasSignInEmail));
},
async getAccounts() {
const provider2 = await this.getProvider();
Expand Down Expand Up @@ -99276,7 +99280,7 @@ function version4(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-C_8sCIH9.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-dFSvgbvM.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 @@ -99458,7 +99462,7 @@ function version3(parameters) {
if (!walletProvider) {
const CoinbaseWalletSDK = await (async () => {
const { default: SDK } = await __vitePreload(async () => {
const { default: SDK2 } = await import("./index-Bt2RUJ5M.js").then((n2) => n2.i);
const { default: SDK2 } = await import("./index-Lo0rLHIQ.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 @@ -99694,7 +99698,7 @@ function walletConnect$1(parameters) {
if (!optionalChains.length)
return;
const { EthereumProvider } = await __vitePreload(async () => {
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-DR9z2nHW.js");
const { EthereumProvider: EthereumProvider2 } = await import("./index.es-CXcCbixk.js");
return { EthereumProvider: EthereumProvider2 };
}, true ? __vite__mapDeps([4,2]) : void 0, import.meta.url);
return await EthereumProvider.init({
Expand Down
4 changes: 2 additions & 2 deletions assets/index-CO7NjHDS.js → assets/index-DOQJULky.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-ymCt28ww.js";
import "./index-BzoDQi9E.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-eOiENYAv.js";
import "./index-C2oeUtnd.js";
function addUniqueItem(array, item) {
array.indexOf(item) === -1 && array.push(item);
}
Expand Down
6 changes: 3 additions & 3 deletions assets/index-Bt2RUJ5M.js → assets/index-Lo0rLHIQ.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-BzoDQi9E.js";
import { r as require$$0$1, e as eventsExports } from "./inherits_browser-B3kpC5sG.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-Csgbk6Vf.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-C2oeUtnd.js";
import { r as require$$0$1, e as eventsExports } from "./inherits_browser-DDgf63Lc.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-BtdrwyMn.js";
var dist$5 = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
4 changes: 2 additions & 2 deletions assets/index-C_8sCIH9.js → assets/index-dFSvgbvM.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-BzoDQi9E.js";
import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-Csgbk6Vf.js";
import { B as Buffer, c as commonjsGlobal, e as eventemitter3Exports, g as getDefaultExportFromCjs } from "./index-C2oeUtnd.js";
import { j as js, s as sha_jsExports, r as require$$0, a as require$$1, b as require$$2 } from "./hooks.module-BtdrwyMn.js";
var dist = {};
var CoinbaseWalletSDK$1 = {};
var walletLogo$1 = {};
Expand Down
6 changes: 3 additions & 3 deletions assets/index-ymCt28ww.js → assets/index-eOiENYAv.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-CO7NjHDS.js","./index-BzoDQi9E.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { _ as __vitePreload } from "./index-BzoDQi9E.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-DOQJULky.js","./index-C2oeUtnd.js","./index-g_cLYwVj.css"])))=>i.map(i=>d[i]);
import { _ as __vitePreload } from "./index-C2oeUtnd.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-CO7NjHDS.js"), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
await __vitePreload(() => import("./index-DOQJULky.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-DR9z2nHW.js → assets/index.es-CXcCbixk.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-ymCt28ww.js","./index-BzoDQi9E.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-BzoDQi9E.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-B3kpC5sG.js";
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["./index-eOiENYAv.js","./index-C2oeUtnd.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-C2oeUtnd.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-DDgf63Lc.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-ymCt28ww.js").then((n4) => n4.i), true ? __vite__mapDeps([0,1,2]) : void 0, import.meta.url);
const { WalletConnectModal: i3 } = await __vitePreload(() => import("./index-eOiENYAv.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-BzoDQi9E.js";
import { g as getDefaultExportFromCjs, a as getAugmentedNamespace, d as dist } from "./index-C2oeUtnd.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-BzoDQi9E.js"></script>
<script type="module" crossorigin src="./assets/index-C2oeUtnd.js"></script>
<link rel="stylesheet" crossorigin href="./assets/index-g_cLYwVj.css">
</head>
<body>
Expand Down

0 comments on commit 41c53fd

Please sign in to comment.