rujira.ui 1.0.17 → 1.0.18
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/cjs/components/header/Header.js +5 -3
- package/lib/cjs/wallets/providers/keplr.js +5 -1
- package/lib/cjs/wallets/providers/leap.js +4 -1
- package/lib/cjs/wallets/providers/okx.js +4 -1
- package/lib/cjs/wallets/providers/station.js +4 -1
- package/lib/cjs/wallets/providers/xaman.js +6 -3
- package/lib/esm/components/header/Header.d.ts.map +1 -1
- package/lib/esm/components/header/Header.js +5 -3
- package/lib/esm/wallets/providers/keplr.d.ts.map +1 -1
- package/lib/esm/wallets/providers/keplr.js +5 -1
- package/lib/esm/wallets/providers/leap.d.ts.map +1 -1
- package/lib/esm/wallets/providers/leap.js +4 -1
- package/lib/esm/wallets/providers/okx.d.ts.map +1 -1
- package/lib/esm/wallets/providers/okx.js +4 -1
- package/lib/esm/wallets/providers/station.d.ts.map +1 -1
- package/lib/esm/wallets/providers/station.js +4 -1
- package/lib/esm/wallets/providers/xaman.d.ts.map +1 -1
- package/lib/esm/wallets/providers/xaman.js +6 -3
- package/package.json +1 -1
- package/src/components/header/Header.tsx +9 -8
- package/src/wallets/providers/keplr.ts +6 -4
- package/src/wallets/providers/leap.ts +8 -4
- package/src/wallets/providers/okx.ts +9 -5
- package/src/wallets/providers/station.ts +8 -4
- package/src/wallets/providers/xaman.ts +8 -4
|
@@ -75,7 +75,9 @@ const Container = ({ children, className, style = {} }) => {
|
|
|
75
75
|
exports.Container = Container;
|
|
76
76
|
const Logo = () => {
|
|
77
77
|
const size = (0, useWindowSize_1.useWindowSize)();
|
|
78
|
-
|
|
78
|
+
// `useWindowSize` returns 0 on SSR and first client render. Treat unknown as desktop
|
|
79
|
+
// so the wordmark ships in initial HTML and doesn't pop in after hydration.
|
|
80
|
+
return ((0, jsx_runtime_1.jsx)(RujiraLogo_1.RujiraLogo, { textColor: "#fff", className: "rujira-header__logo", showText: size.width === 0 || size.width >= 520, animate: true }));
|
|
79
81
|
};
|
|
80
82
|
exports.Logo = Logo;
|
|
81
83
|
const MainNav = ({ domain,
|
|
@@ -189,7 +191,7 @@ const SubBorrow = ({ domain, routingElement, useRef, className, staticRoutes, })
|
|
|
189
191
|
};
|
|
190
192
|
const SubUtilities = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
191
193
|
const { t } = (0, i18n_1.useTranslation)("header");
|
|
192
|
-
return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)("a", { href: "https://ai.autorujira.app/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600", children: [t("rujiAi"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("rujiAiDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("analytics"), domain: domain, to: "analytics", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.ChartMixed, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("analytics") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("analyticsDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("buy"), domain: domain, to: "buy", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.CreditCard, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("buyCrypto") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("buyCryptoDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://daodao.zone", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Users, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("daodao"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("daodaoDesc") })] })] })] }) }));
|
|
194
|
+
return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)("a", { href: "https://ai.autorujira.app/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("rujiAi"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("rujiAiDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("analytics"), domain: domain, to: "/analytics", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.ChartMixed, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("analytics") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("analyticsDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("buy"), domain: domain, to: "buy", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.CreditCard, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("buyCrypto") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("buyCryptoDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://daodao.zone", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Users, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("daodao"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("daodaoDesc") })] })] })] }) }));
|
|
193
195
|
};
|
|
194
196
|
const SubEntertainment = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
195
197
|
const { t } = (0, i18n_1.useTranslation)("header");
|
|
@@ -197,5 +199,5 @@ const SubEntertainment = ({ domain, routingElement, useRef, className, staticRou
|
|
|
197
199
|
};
|
|
198
200
|
const SubLearn = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
199
201
|
const { t } = (0, i18n_1.useTranslation)("header");
|
|
200
|
-
return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("get-started"), domain: domain, to: "get-started", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("getStarted") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("support") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "faq", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "articles", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("articles") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] })] }) }));
|
|
202
|
+
return ((0, jsx_runtime_1.jsx)(Popup, { useRef: useRef, className: className, children: (0, jsx_runtime_1.jsxs)("div", { className: "grid w-60 mt-1", children: [(0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("get-started"), domain: domain, to: "/get-started", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("getStarted") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("support") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), (0, jsx_runtime_1.jsxs)("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsxs)("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), (0, jsx_runtime_1.jsx)(Icons_1.External, { className: "h-1.5 w-a ml-1" })] }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "/faq", className: "flex", children: [(0, jsx_runtime_1.jsx)(Icons_1.Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), (0, jsx_runtime_1.jsxs)(ResolveLink_1.ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "/articles", className: "flex ai-s", children: [(0, jsx_runtime_1.jsx)(Icons_1.History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), (0, jsx_runtime_1.jsxs)("div", { children: [(0, jsx_runtime_1.jsx)("h4", { className: "fs-14 fw-600", children: t("articles") }), (0, jsx_runtime_1.jsx)("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] })] }) }));
|
|
201
203
|
};
|
|
@@ -79,5 +79,9 @@ class KeplrAdapter {
|
|
|
79
79
|
}
|
|
80
80
|
}
|
|
81
81
|
exports.KeplrAdapter = KeplrAdapter;
|
|
82
|
-
|
|
82
|
+
// Construction reads `window.*` so it must be gated for SSR (Next.js, Remix, etc.).
|
|
83
|
+
// The provider is never consumed on the server, so casting the null branch is safe.
|
|
84
|
+
const provider = typeof window === "undefined"
|
|
85
|
+
? null
|
|
86
|
+
: new KeplrAdapter(new eip6963_1.Eip6963Adapter("app.keplr"), () => window.keplr);
|
|
83
87
|
exports.default = provider;
|
|
@@ -32,5 +32,8 @@ class LeapAdapter {
|
|
|
32
32
|
}
|
|
33
33
|
}
|
|
34
34
|
exports.LeapAdapter = LeapAdapter;
|
|
35
|
-
|
|
35
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
36
|
+
const provider = typeof window === "undefined"
|
|
37
|
+
? null
|
|
38
|
+
: new LeapAdapter(new eip6963_1.Eip6963Adapter("io.leapwallet.LeapWallet"), () => window.leap);
|
|
36
39
|
exports.default = provider;
|
|
@@ -75,5 +75,8 @@ class OkxAdapter {
|
|
|
75
75
|
}
|
|
76
76
|
}
|
|
77
77
|
exports.OkxAdapter = OkxAdapter;
|
|
78
|
-
|
|
78
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
79
|
+
const provider = typeof window === "undefined"
|
|
80
|
+
? null
|
|
81
|
+
: new OkxAdapter(new eip6963_1.Eip6963Adapter("com.okex.wallet"), new cosmos_1.CosmosAdapter(() => window.okxwallet?.keplr), window.okxwallet?.bitcoin);
|
|
79
82
|
exports.default = provider;
|
|
@@ -2,5 +2,8 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const eip6963_1 = require("./eip6963");
|
|
4
4
|
const keplr_1 = require("./keplr");
|
|
5
|
-
|
|
5
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
6
|
+
const provider = typeof window === "undefined"
|
|
7
|
+
? null
|
|
8
|
+
: new keplr_1.KeplrAdapter(new eip6963_1.Eip6963Adapter("station"), () => window.station?.keplr);
|
|
6
9
|
exports.default = provider;
|
|
@@ -94,7 +94,10 @@ const signAndBroadcast = async (context, msg) => {
|
|
|
94
94
|
};
|
|
95
95
|
};
|
|
96
96
|
exports.signAndBroadcast = signAndBroadcast;
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
// Construction wires the SDK to `window.*` so it must be gated for SSR.
|
|
98
|
+
const provider = typeof window === "undefined"
|
|
99
|
+
? null
|
|
100
|
+
: new XamanAdapter(
|
|
101
|
+
// Rujira public API key
|
|
102
|
+
"9ce0c336-4724-47e6-8f35-21ce088226bf");
|
|
100
103
|
exports.default = provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Header.d.ts","sourceRoot":"","sources":["../../../../src/components/header/Header.tsx"],"names":[],"mappings":"AAEA,OAAO,EACL,EAAE,EACF,iBAAiB,EACjB,YAAY,EAIb,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAOpC,OAAO,EAAE,eAAe,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAC;AAi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B,eAAe,EAAE,eAAe,CAAC;IACjC,YAAY,CAAC,EAAE,MAAM,EAAE,CAAC;CACzB,4CA+HA,CAAC"}
|
|
@@ -56,7 +56,9 @@ export const Container = ({ children, className, style = {} }) => {
|
|
|
56
56
|
};
|
|
57
57
|
export const Logo = () => {
|
|
58
58
|
const size = useWindowSize();
|
|
59
|
-
|
|
59
|
+
// `useWindowSize` returns 0 on SSR and first client render. Treat unknown as desktop
|
|
60
|
+
// so the wordmark ships in initial HTML and doesn't pop in after hydration.
|
|
61
|
+
return (_jsx(RujiraLogo, { textColor: "#fff", className: "rujira-header__logo", showText: size.width === 0 || size.width >= 520, animate: true }));
|
|
60
62
|
};
|
|
61
63
|
export const MainNav = ({ domain,
|
|
62
64
|
//accountProvider,
|
|
@@ -167,7 +169,7 @@ const SubBorrow = ({ domain, routingElement, useRef, className, staticRoutes, })
|
|
|
167
169
|
};
|
|
168
170
|
const SubUtilities = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
169
171
|
const { t } = useTranslation("header");
|
|
170
|
-
return (_jsx(Popup, { useRef: useRef, className: className, children: _jsxs("div", { className: "grid w-60 mt-1", children: [_jsxs("a", { href: "https://ai.autorujira.app/", target: "_blank", className: "flex ai-s", children: [_jsx(Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600", children: [t("rujiAi"), _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("rujiAiDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("analytics"), domain: domain, to: "analytics", className: "flex ai-s", children: [_jsx(ChartMixed, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("analytics") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("analyticsDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("buy"), domain: domain, to: "buy", className: "flex", children: [_jsx(CreditCard, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("buyCrypto") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("buyCryptoDesc") })] })] }), _jsxs("a", { href: "https://daodao.zone", target: "_blank", className: "flex ai-s", children: [_jsx(Users, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("daodao"), " ", _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("daodaoDesc") })] })] })] }) }));
|
|
172
|
+
return (_jsx(Popup, { useRef: useRef, className: className, children: _jsxs("div", { className: "grid w-60 mt-1", children: [_jsxs("a", { href: "https://ai.autorujira.app/", target: "_blank", className: "flex ai-s", children: [_jsx(Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("rujiAi"), _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("rujiAiDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("analytics"), domain: domain, to: "/analytics", className: "flex ai-s", children: [_jsx(ChartMixed, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("analytics") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("analyticsDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("buy"), domain: domain, to: "buy", className: "flex", children: [_jsx(CreditCard, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("buyCrypto") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("buyCryptoDesc") })] })] }), _jsxs("a", { href: "https://daodao.zone", target: "_blank", className: "flex ai-s", children: [_jsx(Users, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("daodao"), " ", _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("daodaoDesc") })] })] })] }) }));
|
|
171
173
|
};
|
|
172
174
|
const SubEntertainment = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
173
175
|
const { t } = useTranslation("header");
|
|
@@ -175,5 +177,5 @@ const SubEntertainment = ({ domain, routingElement, useRef, className, staticRou
|
|
|
175
177
|
};
|
|
176
178
|
const SubLearn = ({ domain, routingElement, useRef, className, staticRoutes, }) => {
|
|
177
179
|
const { t } = useTranslation("header");
|
|
178
|
-
return (_jsx(Popup, { useRef: useRef, className: className, children: _jsxs("div", { className: "grid w-60 mt-1", children: [_jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("get-started"), domain: domain, to: "get-started", className: "flex ai-s", children: [_jsx(Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("getStarted") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [_jsx(Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("support") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), _jsxs("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [_jsx(Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), _jsxs("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [_jsx(Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "faq", className: "flex", children: [_jsx(Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "articles", className: "flex ai-s", children: [_jsx(History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("articles") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] })] }) }));
|
|
180
|
+
return (_jsx(Popup, { useRef: useRef, className: className, children: _jsxs("div", { className: "grid w-60 mt-1", children: [_jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("get-started"), domain: domain, to: "/get-started", className: "flex ai-s", children: [_jsx(Graduate, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("getStarted") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("getStartedDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("support"), domain: domain, to: "/support", className: "flex ai-s", children: [_jsx(Support, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("support") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("educationDesc") })] })] }), _jsxs("a", { href: "https://docs.rujira.network/", target: "_blank", className: "flex ai-s", children: [_jsx(Code, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("documentation"), " ", _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("documentationDesc") })] })] }), _jsxs("a", { href: "https://docs.rujira.network/developers/getting-started", target: "_blank", className: "flex ai-s", children: [_jsx(Terminal, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsxs("h4", { className: "fs-14 fw-600 flex ai-c", children: [t("developers"), _jsx(External, { className: "h-1.5 w-a ml-1" })] }), _jsx("p", { className: "fs-12 mt-0.5", children: t("developersDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("faq"), domain: domain, to: "/faq", className: "flex", children: [_jsx(Info, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("commonQuestions") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("supportDesc") })] })] }), _jsxs(ResolveLink, { as: routingElement, isStatic: staticRoutes?.includes("articles"), domain: domain, to: "/articles", className: "flex ai-s", children: [_jsx(History, { className: "color-grey h-3.5 w-a block mr-2 no-shrink mt-0" }), _jsxs("div", { children: [_jsx("h4", { className: "fs-14 fw-600", children: t("articles") }), _jsx("p", { className: "fs-12 mt-0.5", children: t("articlesDesc") })] })] })] }) }));
|
|
179
181
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keplr.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/keplr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EACL,OAAO,EAEP,GAAG,EACH,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAK3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAO,SAAQ,WAAW;KAAG;CACxC;AAED,qBAAa,YAAa,YAAW,MAAM;IAGvC,OAAO,CAAC,CAAC;IAFX,OAAO,CAAC,CAAC,CAAgB;gBAEf,CAAC,EAAE,cAAc,EACzB,CAAC,EAAE,MAAM,KAAK,GAAG,SAAS;IAI5B,QAAQ,OAAQ,MAAM,IAAI,UAGxB;IAEF,WAAW,IAAI,OAAO;IAIT,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAcpC,kBAAkB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAQjC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAkBvC,gBAAgB,CAC3B,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,QAAQ,CAAC;IAwBb,QAAQ,IAAI,OAAO,EAAE;CAG7B;
|
|
1
|
+
{"version":3,"file":"keplr.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/keplr.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EACL,OAAO,EAEP,GAAG,EACH,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EACT,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,cAAc,EAAE,MAAM,WAAW,CAAC;AAK3C,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAO,SAAQ,WAAW;KAAG;CACxC;AAED,qBAAa,YAAa,YAAW,MAAM;IAGvC,OAAO,CAAC,CAAC;IAFX,OAAO,CAAC,CAAC,CAAgB;gBAEf,CAAC,EAAE,cAAc,EACzB,CAAC,EAAE,MAAM,KAAK,GAAG,SAAS;IAI5B,QAAQ,OAAQ,MAAM,IAAI,UAGxB;IAEF,WAAW,IAAI,OAAO;IAIT,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAcpC,kBAAkB,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAQjC,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAkBvC,gBAAgB,CAC3B,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,QAAQ,CAAC;IAwBb,QAAQ,IAAI,OAAO,EAAE;CAG7B;AAID,QAAA,MAAM,QAAQ,EAAE,YAG2D,CAAC;AAE5E,eAAe,QAAQ,CAAC"}
|
|
@@ -75,5 +75,9 @@ export class KeplrAdapter {
|
|
|
75
75
|
return [BTC, ...this.c.networks(), ...this.e.networks()];
|
|
76
76
|
}
|
|
77
77
|
}
|
|
78
|
-
|
|
78
|
+
// Construction reads `window.*` so it must be gated for SSR (Next.js, Remix, etc.).
|
|
79
|
+
// The provider is never consumed on the server, so casting the null branch is safe.
|
|
80
|
+
const provider = typeof window === "undefined"
|
|
81
|
+
? null
|
|
82
|
+
: new KeplrAdapter(new Eip6963Adapter("app.keplr"), () => window.keplr);
|
|
79
83
|
export default provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"leap.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/leap.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,OAAO,EAAE,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,UAAU,EAAE,QAA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K,EAAE,KAAK,GAAG;YAAE,KAAK,EAAE;gBAAE,IAAI,EAAE,aAAa,CAAA;aAAE,CAAA;SAAE,CAAC;KACnD;CACF;AAED,qBAAa,WAAY,YAAW,MAAM;IAGtC,OAAO,CAAC,CAAC;IAFX,OAAO,CAAC,CAAC,CAAgB;gBAEf,CAAC,EAAE,cAAc,EACzB,CAAC,EAAE,MAAM,KAAK,GAAG,SAAS;IAI5B,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,WAAW,IAAI,OAAO;IAIT,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAU7B,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAKvC,gBAAgB,CAC3B,UAAU,EAAE,UAAU,EACtB,GAAG,EAAE,GAAG,GACP,OAAO,CAAC,QAAQ,CAAC;IAMb,QAAQ,IAAI,OAAO,EAAE;CAG7B;AAGD,QAAA,MAAM,QAAQ,EAAE,WAMT,CAAC;AAER,eAAe,QAAQ,CAAC"}
|
|
@@ -28,5 +28,8 @@ export class LeapAdapter {
|
|
|
28
28
|
return [...this.c.networks(), ...this.e.networks()];
|
|
29
29
|
}
|
|
30
30
|
}
|
|
31
|
-
|
|
31
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
32
|
+
const provider = typeof window === "undefined"
|
|
33
|
+
? null
|
|
34
|
+
: new LeapAdapter(new Eip6963Adapter("io.leapwallet.LeapWallet"), () => window.leap);
|
|
32
35
|
export default provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"okx.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/okx.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,IAAI,WAAW,EAAE,MAAM,qBAAqB,CAAC;AAEnE,OAAO,EAAE,eAAe,EAAE,MAAM,QAAQ,CAAC;AACzC,O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AC,UAAU,CAAC;IAiBvC,gBAAgB,CAAC,UAAU,EAAE,UAAU,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;IA2B3E,QAAQ,CAAC,EAAE,CAAC,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAClD,WAAW;IAIJ,QAAQ,IAAI,OAAO,EAAE;CAG7B;AAGD,QAAA,MAAM,QAAQ,EAAE,UAOT,CAAC;AAER,eAAe,QAAQ,CAAC"}
|
|
@@ -71,5 +71,8 @@ export class OkxAdapter {
|
|
|
71
71
|
return [BTC, ...this.c.networks(), ...this.e.networks()];
|
|
72
72
|
}
|
|
73
73
|
}
|
|
74
|
-
|
|
74
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
75
|
+
const provider = typeof window === "undefined"
|
|
76
|
+
? null
|
|
77
|
+
: new OkxAdapter(new Eip6963Adapter("com.okex.wallet"), new CosmosAdapter(() => window.okxwallet?.keplr), window.okxwallet?.bitcoin);
|
|
75
78
|
export default provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"station.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/station.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YAAE,KAAK,EAAE,KAAK,CAAA;SAAE,CAAC;KAC5B;CACF;
|
|
1
|
+
{"version":3,"file":"station.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/station.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,qBAAqB,CAAC;AAE5C,OAAO,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAEvC,OAAO,CAAC,MAAM,CAAC;IACb,UAAU,MAAM;QACd,OAAO,CAAC,EAAE;YAAE,KAAK,EAAE,KAAK,CAAA;SAAE,CAAC;KAC5B;CACF;AAGD,QAAA,MAAM,QAAQ,EAAE,YAMT,CAAC;AAER,eAAe,QAAQ,CAAC"}
|
|
@@ -1,4 +1,7 @@
|
|
|
1
1
|
import { Eip6963Adapter } from "./eip6963";
|
|
2
2
|
import { KeplrAdapter } from "./keplr";
|
|
3
|
-
|
|
3
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
4
|
+
const provider = typeof window === "undefined"
|
|
5
|
+
? null
|
|
6
|
+
: new KeplrAdapter(new Eip6963Adapter("station"), () => window.station?.keplr);
|
|
4
7
|
export default provider;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"xaman.d.ts","sourceRoot":"","sources":["../../../../src/wallets/providers/xaman.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,OAAO,EACP,GAAG,EACH,OAAO,EACP,MAAM,EACN,UAAU,EACV,QAAQ,EAET,MAAM,WAAW,CAAC;AAEnB,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,MAAM,MAAM,YAAY,GAAG,YAAY,CAAC;AACxC,KAAK,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC,GAAG,CAAC,cAAc,CAAC,CAAC,CAAC,CAAC;AAE3D,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;CAC9C;AAED,qBAAa,YAAa,YAAW,MAAM;IAG7B,OAAO,CAAC,MAAM;IAF1B,OAAO,CAAC,IAAI,CAAC,CAAO;IACpB,OAAO,CAAC,gBAAgB,CAAyB;gBAC7B,MAAM,EAAE,MAAM;IAElC,OAAO,CAAC,OAAO;IAWT,OAAO,IAAI,OAAO,CAAC,OAAO,EAAE,CAAC;IAM7B,QAAQ,CAAC,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,UAAU,CAAC;IAGvC,gBAAgB,CAA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,EAAE,GAAG,EAAE,GAAG,GAAG,OAAO,CAAC,QAAQ,CAAC;IAGtE,MAAM,CAAC,OAAO,EAAE,UAAU,GAAG,OAAO,CAAC,MAAM,CAAC;IAuBlD,WAAW;IAGX,UAAU;IAGV,QAAQ,CAAC,EAAE,EAAE,MAAM,IAAI;IAOhB,QAAQ,IAAI,OAAO,EAAE;CAG7B;AAED,eAAO,MAAM,QAAQ,QAAe,GAAG,KAAG,OAAO,CAAC,UAAU,CAQ3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,YAClB,UAAU,OACd,GAAG,KACP,OAAO,CAAC,QAAQ,CAQlB,CAAC;AAGF,QAAA,MAAM,QAAQ,EAAE,YAMT,CAAC;AACR,eAAe,QAAQ,CAAC"}
|
|
@@ -88,7 +88,10 @@ export const signAndBroadcast = async (context, msg) => {
|
|
|
88
88
|
deposited: msg.toDeposit?.() || null,
|
|
89
89
|
};
|
|
90
90
|
};
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
91
|
+
// Construction wires the SDK to `window.*` so it must be gated for SSR.
|
|
92
|
+
const provider = typeof window === "undefined"
|
|
93
|
+
? null
|
|
94
|
+
: new XamanAdapter(
|
|
95
|
+
// Rujira public API key
|
|
96
|
+
"9ce0c336-4724-47e6-8f35-21ce088226bf");
|
|
94
97
|
export default provider;
|
package/package.json
CHANGED
|
@@ -145,8 +145,7 @@ export const Header = ({
|
|
|
145
145
|
onMouseOut={() => setHover(false)}
|
|
146
146
|
onClick={() => {
|
|
147
147
|
accounts?.length === 0 ? ConnectModal() : onDeposit!();
|
|
148
|
-
}}
|
|
149
|
-
>
|
|
148
|
+
}}>
|
|
150
149
|
<img src={hover ? deposit : depositStatic} alt="Deposit" />
|
|
151
150
|
<span>{t("deposit")}</span>
|
|
152
151
|
</button>
|
|
@@ -189,11 +188,13 @@ export const Container: React.FC<
|
|
|
189
188
|
|
|
190
189
|
export const Logo = () => {
|
|
191
190
|
const size = useWindowSize();
|
|
191
|
+
// `useWindowSize` returns 0 on SSR and first client render. Treat unknown as desktop
|
|
192
|
+
// so the wordmark ships in initial HTML and doesn't pop in after hydration.
|
|
192
193
|
return (
|
|
193
194
|
<RujiraLogo
|
|
194
195
|
textColor="#fff"
|
|
195
196
|
className="rujira-header__logo"
|
|
196
|
-
showText={size.width >= 520}
|
|
197
|
+
showText={size.width === 0 || size.width >= 520}
|
|
197
198
|
animate={true}
|
|
198
199
|
/>
|
|
199
200
|
);
|
|
@@ -745,7 +746,7 @@ const SubUtilities = ({
|
|
|
745
746
|
className="flex ai-s">
|
|
746
747
|
<Terminal className="color-grey h-3.5 w-a block mr-2 no-shrink mt-0" />
|
|
747
748
|
<div>
|
|
748
|
-
<h4 className="fs-14 fw-600">
|
|
749
|
+
<h4 className="fs-14 fw-600 flex ai-c">
|
|
749
750
|
{t("rujiAi")}
|
|
750
751
|
<External className="h-1.5 w-a ml-1" />
|
|
751
752
|
</h4>
|
|
@@ -756,7 +757,7 @@ const SubUtilities = ({
|
|
|
756
757
|
as={routingElement}
|
|
757
758
|
isStatic={staticRoutes?.includes("analytics")}
|
|
758
759
|
domain={domain}
|
|
759
|
-
to="analytics"
|
|
760
|
+
to="/analytics"
|
|
760
761
|
className="flex ai-s">
|
|
761
762
|
<ChartMixed className="color-grey h-3.5 w-a block mr-2 no-shrink mt-0" />
|
|
762
763
|
<div>
|
|
@@ -881,7 +882,7 @@ const SubLearn = ({
|
|
|
881
882
|
as={routingElement}
|
|
882
883
|
isStatic={staticRoutes?.includes("get-started")}
|
|
883
884
|
domain={domain}
|
|
884
|
-
to="get-started"
|
|
885
|
+
to="/get-started"
|
|
885
886
|
className="flex ai-s">
|
|
886
887
|
<Graduate className="color-grey h-3.5 w-a block mr-2 no-shrink mt-0" />
|
|
887
888
|
<div>
|
|
@@ -952,7 +953,7 @@ const SubLearn = ({
|
|
|
952
953
|
as={routingElement}
|
|
953
954
|
isStatic={staticRoutes?.includes("faq")}
|
|
954
955
|
domain={domain}
|
|
955
|
-
to="faq"
|
|
956
|
+
to="/faq"
|
|
956
957
|
className="flex">
|
|
957
958
|
<Info className="color-grey h-3.5 w-a block mr-2 no-shrink mt-0" />
|
|
958
959
|
<div>
|
|
@@ -964,7 +965,7 @@ const SubLearn = ({
|
|
|
964
965
|
as={routingElement}
|
|
965
966
|
isStatic={staticRoutes?.includes("articles")}
|
|
966
967
|
domain={domain}
|
|
967
|
-
to="articles"
|
|
968
|
+
to="/articles"
|
|
968
969
|
className="flex ai-s">
|
|
969
970
|
<History className="color-grey h-3.5 w-a block mr-2 no-shrink mt-0" />
|
|
970
971
|
<div>
|
|
@@ -108,9 +108,11 @@ export class KeplrAdapter implements Signer {
|
|
|
108
108
|
}
|
|
109
109
|
}
|
|
110
110
|
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
111
|
+
// Construction reads `window.*` so it must be gated for SSR (Next.js, Remix, etc.).
|
|
112
|
+
// The provider is never consumed on the server, so casting the null branch is safe.
|
|
113
|
+
const provider: KeplrAdapter =
|
|
114
|
+
typeof window === "undefined"
|
|
115
|
+
? (null as unknown as KeplrAdapter)
|
|
116
|
+
: new KeplrAdapter(new Eip6963Adapter("app.keplr"), () => window.keplr);
|
|
115
117
|
|
|
116
118
|
export default provider;
|
|
@@ -52,9 +52,13 @@ export class LeapAdapter implements Signer {
|
|
|
52
52
|
}
|
|
53
53
|
}
|
|
54
54
|
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
)
|
|
55
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
56
|
+
const provider: LeapAdapter =
|
|
57
|
+
typeof window === "undefined"
|
|
58
|
+
? (null as unknown as LeapAdapter)
|
|
59
|
+
: new LeapAdapter(
|
|
60
|
+
new Eip6963Adapter("io.leapwallet.LeapWallet"),
|
|
61
|
+
() => window.leap
|
|
62
|
+
);
|
|
59
63
|
|
|
60
64
|
export default provider;
|
|
@@ -103,10 +103,14 @@ export class OkxAdapter implements Signer {
|
|
|
103
103
|
}
|
|
104
104
|
}
|
|
105
105
|
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
106
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
107
|
+
const provider: OkxAdapter =
|
|
108
|
+
typeof window === "undefined"
|
|
109
|
+
? (null as unknown as OkxAdapter)
|
|
110
|
+
: new OkxAdapter(
|
|
111
|
+
new Eip6963Adapter("com.okex.wallet"),
|
|
112
|
+
new CosmosAdapter(() => window.okxwallet?.keplr),
|
|
113
|
+
window.okxwallet?.bitcoin
|
|
114
|
+
);
|
|
111
115
|
|
|
112
116
|
export default provider;
|
|
@@ -8,9 +8,13 @@ declare global {
|
|
|
8
8
|
}
|
|
9
9
|
}
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
)
|
|
11
|
+
// Construction reads `window.*` so it must be gated for SSR.
|
|
12
|
+
const provider: KeplrAdapter =
|
|
13
|
+
typeof window === "undefined"
|
|
14
|
+
? (null as unknown as KeplrAdapter)
|
|
15
|
+
: new KeplrAdapter(
|
|
16
|
+
new Eip6963Adapter("station"),
|
|
17
|
+
() => window.station?.keplr
|
|
18
|
+
);
|
|
15
19
|
|
|
16
20
|
export default provider;
|
|
@@ -109,8 +109,12 @@ export const signAndBroadcast = async (
|
|
|
109
109
|
};
|
|
110
110
|
};
|
|
111
111
|
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
"
|
|
115
|
-
)
|
|
112
|
+
// Construction wires the SDK to `window.*` so it must be gated for SSR.
|
|
113
|
+
const provider: XamanAdapter =
|
|
114
|
+
typeof window === "undefined"
|
|
115
|
+
? (null as unknown as XamanAdapter)
|
|
116
|
+
: new XamanAdapter(
|
|
117
|
+
// Rujira public API key
|
|
118
|
+
"9ce0c336-4724-47e6-8f35-21ce088226bf"
|
|
119
|
+
);
|
|
116
120
|
export default provider;
|