@yieldfabric/wallet 0.2.6 → 0.2.7
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/dist/index.cjs +721 -698
- package/dist/index.d.cts +6 -1
- package/dist/index.d.ts +6 -1
- package/dist/index.js +80 -57
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -2594,8 +2594,13 @@ interface OnboardingWizardProps {
|
|
|
2594
2594
|
* linked to. One agreement should be consented to once, on the screen that
|
|
2595
2595
|
* actually displays it. */
|
|
2596
2596
|
sponsorshipConsent?: 'wizard' | 'host';
|
|
2597
|
+
/** Host-paid applications never offer personal plans/card capture, including
|
|
2598
|
+
* backend-paid apps whose end-user JWT deliberately has no sponsor tag.
|
|
2599
|
+
* Bank/account opening is deferred to the host's explicit post-consent action.
|
|
2600
|
+
* This controls onboarding UX only; server-side billing gates still apply. */
|
|
2601
|
+
billingMode?: 'automatic' | 'host';
|
|
2597
2602
|
}
|
|
2598
|
-
declare function OnboardingWizard({ initialPathname, chrome, onComplete, branding, invite, platform, onSelectPlatform, sponsorshipConsent, }: OnboardingWizardProps): react_jsx_runtime.JSX.Element;
|
|
2603
|
+
declare function OnboardingWizard({ initialPathname, chrome, onComplete, branding, invite, platform, onSelectPlatform, sponsorshipConsent, billingMode, }: OnboardingWizardProps): react_jsx_runtime.JSX.Element;
|
|
2599
2604
|
|
|
2600
2605
|
/**
|
|
2601
2606
|
* @file ui/onboarding/OnboardingPolicySection.tsx
|
package/dist/index.d.ts
CHANGED
|
@@ -2594,8 +2594,13 @@ interface OnboardingWizardProps {
|
|
|
2594
2594
|
* linked to. One agreement should be consented to once, on the screen that
|
|
2595
2595
|
* actually displays it. */
|
|
2596
2596
|
sponsorshipConsent?: 'wizard' | 'host';
|
|
2597
|
+
/** Host-paid applications never offer personal plans/card capture, including
|
|
2598
|
+
* backend-paid apps whose end-user JWT deliberately has no sponsor tag.
|
|
2599
|
+
* Bank/account opening is deferred to the host's explicit post-consent action.
|
|
2600
|
+
* This controls onboarding UX only; server-side billing gates still apply. */
|
|
2601
|
+
billingMode?: 'automatic' | 'host';
|
|
2597
2602
|
}
|
|
2598
|
-
declare function OnboardingWizard({ initialPathname, chrome, onComplete, branding, invite, platform, onSelectPlatform, sponsorshipConsent, }: OnboardingWizardProps): react_jsx_runtime.JSX.Element;
|
|
2603
|
+
declare function OnboardingWizard({ initialPathname, chrome, onComplete, branding, invite, platform, onSelectPlatform, sponsorshipConsent, billingMode, }: OnboardingWizardProps): react_jsx_runtime.JSX.Element;
|
|
2599
2604
|
|
|
2600
2605
|
/**
|
|
2601
2606
|
* @file ui/onboarding/OnboardingPolicySection.tsx
|
package/dist/index.js
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
* Source review requires written authorization; see package LICENSE.md and NOTICE.md.
|
|
6
6
|
* Runtime use requires a separate express license.
|
|
7
7
|
*/
|
|
8
|
-
import
|
|
8
|
+
import React39, { createContext, lazy, useContext, useState, useEffect, useRef, useCallback, useMemo, Suspense, useId, Component } from 'react';
|
|
9
9
|
import { jsx, jsxs, Fragment } from 'react/jsx-runtime';
|
|
10
10
|
import { AvererSdkProvider, useAvererWallet, AvererWebSdk } from '@averer/averer-websdk';
|
|
11
11
|
import sha3, { keccak256 } from 'js-sha3';
|
|
@@ -9985,7 +9985,7 @@ function WizardProvider({
|
|
|
9985
9985
|
const [planSelection, setPlanSelection] = useState(
|
|
9986
9986
|
readOnboardingPlanSelectionHint
|
|
9987
9987
|
);
|
|
9988
|
-
const pendingSponsorshipRef =
|
|
9988
|
+
const pendingSponsorshipRef = React39.useRef(
|
|
9989
9989
|
pendingSponsorship
|
|
9990
9990
|
);
|
|
9991
9991
|
const stageSponsorship = useCallback((groupId, destination) => {
|
|
@@ -11199,8 +11199,8 @@ var DynamicCompleter = ({ sdk, action, onError }) => {
|
|
|
11199
11199
|
const ctx = sdk.useDynamicContext();
|
|
11200
11200
|
const wallet = ctx.primaryWallet;
|
|
11201
11201
|
const dynamicUser = ctx.user;
|
|
11202
|
-
const [done, setDone] =
|
|
11203
|
-
|
|
11202
|
+
const [done, setDone] = React39.useState(false);
|
|
11203
|
+
React39.useEffect(() => {
|
|
11204
11204
|
if (done || !wallet?.address) return;
|
|
11205
11205
|
setDone(true);
|
|
11206
11206
|
(async () => {
|
|
@@ -11625,8 +11625,8 @@ var KycFlow3 = ({ onComplete, onError, instanceId }) => {
|
|
|
11625
11625
|
const settings = config?.kyc.settings[providerId];
|
|
11626
11626
|
const publishableKey = settings?.publishable_key;
|
|
11627
11627
|
const requiredForCompletion = settings?.required_for_completion ?? false;
|
|
11628
|
-
const [stage, setStage] =
|
|
11629
|
-
|
|
11628
|
+
const [stage, setStage] = React39.useState({ kind: "idle" });
|
|
11629
|
+
React39.useEffect(() => {
|
|
11630
11630
|
let cancelled = false;
|
|
11631
11631
|
(async () => {
|
|
11632
11632
|
try {
|
|
@@ -11650,7 +11650,7 @@ var KycFlow3 = ({ onComplete, onError, instanceId }) => {
|
|
|
11650
11650
|
cancelled = true;
|
|
11651
11651
|
};
|
|
11652
11652
|
}, []);
|
|
11653
|
-
|
|
11653
|
+
React39.useEffect(() => {
|
|
11654
11654
|
if (stage.kind !== "pending-poll") return;
|
|
11655
11655
|
let cancelled = false;
|
|
11656
11656
|
const pollOnce = async () => {
|
|
@@ -11902,14 +11902,14 @@ function useIdentityStatusPoll(opts) {
|
|
|
11902
11902
|
provider,
|
|
11903
11903
|
credentialType
|
|
11904
11904
|
} = opts;
|
|
11905
|
-
const [stuckHint, setStuckHint] =
|
|
11906
|
-
const onVerifiedRef =
|
|
11907
|
-
const onRejectedRef =
|
|
11908
|
-
|
|
11905
|
+
const [stuckHint, setStuckHint] = React39.useState(false);
|
|
11906
|
+
const onVerifiedRef = React39.useRef(onVerified);
|
|
11907
|
+
const onRejectedRef = React39.useRef(onRejected);
|
|
11908
|
+
React39.useEffect(() => {
|
|
11909
11909
|
onVerifiedRef.current = onVerified;
|
|
11910
11910
|
onRejectedRef.current = onRejected;
|
|
11911
11911
|
}, [onVerified, onRejected]);
|
|
11912
|
-
|
|
11912
|
+
React39.useEffect(() => {
|
|
11913
11913
|
if (!active) {
|
|
11914
11914
|
setStuckHint(false);
|
|
11915
11915
|
return;
|
|
@@ -12047,12 +12047,12 @@ var KycFlow4 = ({ onComplete, onError, instanceId, subject }) => {
|
|
|
12047
12047
|
const groupId = subject?.kind === "group" ? subject.id : void 0;
|
|
12048
12048
|
const configuredLevel = config?.kyc.settings[providerId]?.level_name?.trim();
|
|
12049
12049
|
const levelName = configuredLevel || "id-and-liveness";
|
|
12050
|
-
const [token, setToken] =
|
|
12051
|
-
const [stage, setStage] =
|
|
12052
|
-
const [attempt, setAttempt] =
|
|
12053
|
-
const submittedRef =
|
|
12054
|
-
const applicantIdRef =
|
|
12055
|
-
|
|
12050
|
+
const [token, setToken] = React39.useState(null);
|
|
12051
|
+
const [stage, setStage] = React39.useState({ kind: "init" });
|
|
12052
|
+
const [attempt, setAttempt] = React39.useState(0);
|
|
12053
|
+
const submittedRef = React39.useRef(false);
|
|
12054
|
+
const applicantIdRef = React39.useRef(void 0);
|
|
12055
|
+
React39.useEffect(() => {
|
|
12056
12056
|
let cancelled = false;
|
|
12057
12057
|
submittedRef.current = false;
|
|
12058
12058
|
(async () => {
|
|
@@ -16018,7 +16018,7 @@ function Field({
|
|
|
16018
16018
|
value,
|
|
16019
16019
|
copyable
|
|
16020
16020
|
}) {
|
|
16021
|
-
const [copied, setCopied] =
|
|
16021
|
+
const [copied, setCopied] = React39.useState(false);
|
|
16022
16022
|
return /* @__PURE__ */ jsxs("div", { children: [
|
|
16023
16023
|
/* @__PURE__ */ jsx("p", { className: "text-[10px] uppercase tracking-wider text-text-secondary", children: label }),
|
|
16024
16024
|
/* @__PURE__ */ jsxs("div", { className: "mt-0.5 flex items-center gap-2", children: [
|
|
@@ -16082,14 +16082,16 @@ var STAGE_COPY = {
|
|
|
16082
16082
|
not_applicable: { title: "Finishing up", body: "" }
|
|
16083
16083
|
};
|
|
16084
16084
|
var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
16085
|
-
const [status, setStatus] =
|
|
16086
|
-
const [impatient, setImpatient] =
|
|
16087
|
-
const
|
|
16088
|
-
const
|
|
16089
|
-
|
|
16085
|
+
const [status, setStatus] = React39.useState(null);
|
|
16086
|
+
const [impatient, setImpatient] = React39.useState(false);
|
|
16087
|
+
const [unavailable, setUnavailable] = React39.useState(false);
|
|
16088
|
+
const [attempt, setAttempt] = React39.useState(0);
|
|
16089
|
+
const activationStarted = React39.useRef(false);
|
|
16090
|
+
const onContinueRef = React39.useRef(onContinue);
|
|
16091
|
+
React39.useEffect(() => {
|
|
16090
16092
|
onContinueRef.current = onContinue;
|
|
16091
16093
|
}, [onContinue]);
|
|
16092
|
-
|
|
16094
|
+
React39.useEffect(() => {
|
|
16093
16095
|
let cancelled = false;
|
|
16094
16096
|
let timer;
|
|
16095
16097
|
const startedAt = Date.now();
|
|
@@ -16097,8 +16099,9 @@ var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
|
16097
16099
|
if (cancelled) return;
|
|
16098
16100
|
let terminal = false;
|
|
16099
16101
|
try {
|
|
16100
|
-
const next = await fetchAccountOpeningStatus();
|
|
16102
|
+
const next = await withDeadline(fetchAccountOpeningStatus(), "Account opening status");
|
|
16101
16103
|
if (cancelled) return;
|
|
16104
|
+
setUnavailable(false);
|
|
16102
16105
|
setStatus(next);
|
|
16103
16106
|
if (next.status === "not_started") {
|
|
16104
16107
|
onContinueRef.current();
|
|
@@ -16115,6 +16118,8 @@ var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
|
16115
16118
|
);
|
|
16116
16119
|
}
|
|
16117
16120
|
} catch {
|
|
16121
|
+
if (cancelled) return;
|
|
16122
|
+
setUnavailable(true);
|
|
16118
16123
|
}
|
|
16119
16124
|
if (cancelled || terminal) return;
|
|
16120
16125
|
const waited = Date.now() - startedAt;
|
|
@@ -16126,8 +16131,20 @@ var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
|
16126
16131
|
cancelled = true;
|
|
16127
16132
|
if (timer !== void 0) window.clearTimeout(timer);
|
|
16128
16133
|
};
|
|
16129
|
-
}, []);
|
|
16130
|
-
if (!status)
|
|
16134
|
+
}, [attempt]);
|
|
16135
|
+
if (unavailable || !status) {
|
|
16136
|
+
return /* @__PURE__ */ jsxs("div", { className: "space-y-4 text-center", role: "status", "aria-live": "polite", children: [
|
|
16137
|
+
/* @__PURE__ */ jsx("p", { children: unavailable ? "We couldn\u2019t check your account right now." : "Checking your account\u2026" }),
|
|
16138
|
+
unavailable && /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
16139
|
+
/* @__PURE__ */ jsx("p", { className: "text-[12px] text-text-secondary", children: "You can try again or continue. Your account details will be available when setup finishes." }),
|
|
16140
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "min-h-[44px] w-full rounded-lg bg-cta px-4 py-2.5 text-on-cta", onClick: () => {
|
|
16141
|
+
setUnavailable(false);
|
|
16142
|
+
setAttempt((value) => value + 1);
|
|
16143
|
+
}, children: "Try again" }),
|
|
16144
|
+
/* @__PURE__ */ jsx("button", { type: "button", className: "min-h-[44px] w-full", onClick: onContinue, children: continueLabel })
|
|
16145
|
+
] })
|
|
16146
|
+
] });
|
|
16147
|
+
}
|
|
16131
16148
|
if (status.status === "ready" && status.account) {
|
|
16132
16149
|
return /* @__PURE__ */ jsxs("div", { className: "space-y-4", role: "status", "aria-live": "polite", children: [
|
|
16133
16150
|
/* @__PURE__ */ jsxs("div", { children: [
|
|
@@ -16185,13 +16202,13 @@ var AccountOpeningPanel = ({ onContinue, continueLabel = "Continue" }) => {
|
|
|
16185
16202
|
init_authService();
|
|
16186
16203
|
var WALLET_AWAKENING_MS = 1100;
|
|
16187
16204
|
var TOTAL_MS = 3e3;
|
|
16188
|
-
function OnboardingWelcomeMoment({ chrome } = {}) {
|
|
16205
|
+
function OnboardingWelcomeMoment({ chrome, deferAccountOpening = false } = {}) {
|
|
16189
16206
|
const navigate = useWizardNavigate();
|
|
16190
16207
|
const { messages } = useBranding();
|
|
16191
16208
|
const [name, setName] = useState("");
|
|
16192
16209
|
const [walletShort, setWalletShort] = useState(null);
|
|
16193
16210
|
const [phase, setPhase] = useState("wallet");
|
|
16194
|
-
const [accountOpened, setAccountOpened] = useState(
|
|
16211
|
+
const [accountOpened, setAccountOpened] = useState(deferAccountOpening);
|
|
16195
16212
|
useEffect(() => {
|
|
16196
16213
|
let cancelled = false;
|
|
16197
16214
|
(async () => {
|
|
@@ -17363,7 +17380,8 @@ function OnboardingWizard({
|
|
|
17363
17380
|
invite,
|
|
17364
17381
|
platform,
|
|
17365
17382
|
onSelectPlatform,
|
|
17366
|
-
sponsorshipConsent = "wizard"
|
|
17383
|
+
sponsorshipConsent = "wizard",
|
|
17384
|
+
billingMode = "automatic"
|
|
17367
17385
|
}) {
|
|
17368
17386
|
return /* @__PURE__ */ jsx(BrandingProvider, { branding, children: /* @__PURE__ */ jsx(
|
|
17369
17387
|
WizardProvider,
|
|
@@ -17377,7 +17395,8 @@ function OnboardingWizard({
|
|
|
17377
17395
|
{
|
|
17378
17396
|
chrome,
|
|
17379
17397
|
onSelectPlatform,
|
|
17380
|
-
sponsorshipConsent
|
|
17398
|
+
sponsorshipConsent,
|
|
17399
|
+
billingMode
|
|
17381
17400
|
}
|
|
17382
17401
|
)
|
|
17383
17402
|
}
|
|
@@ -17407,7 +17426,8 @@ function gateToPath(status) {
|
|
|
17407
17426
|
function WizardRouter({
|
|
17408
17427
|
chrome,
|
|
17409
17428
|
onSelectPlatform,
|
|
17410
|
-
sponsorshipConsent = "wizard"
|
|
17429
|
+
sponsorshipConsent = "wizard",
|
|
17430
|
+
billingMode = "automatic"
|
|
17411
17431
|
}) {
|
|
17412
17432
|
const pathname = useWizardPathname();
|
|
17413
17433
|
const { config } = useProviderConfig();
|
|
@@ -17416,7 +17436,7 @@ function WizardRouter({
|
|
|
17416
17436
|
const effectivePlatform = wizardPlatform ?? config?.platform?.group_id ?? pendingSponsorship?.groupId;
|
|
17417
17437
|
const primaryKycId = config?.kyc.primary;
|
|
17418
17438
|
const identityRequired = !!(primaryKycId && config?.kyc.enabled.includes(primaryKycId) && config?.kyc.settings[primaryKycId]?.required_for_completion);
|
|
17419
|
-
const planApplicable = !effectivePlatform && !personalSessionHasGroupPayer();
|
|
17439
|
+
const planApplicable = billingMode !== "host" && !effectivePlatform && !personalSessionHasGroupPayer();
|
|
17420
17440
|
const allowedIdentityProviders = userIdentityStatusScopes(config);
|
|
17421
17441
|
const gate = useOnboardingState(
|
|
17422
17442
|
identityRequired,
|
|
@@ -17427,11 +17447,14 @@ function WizardRouter({
|
|
|
17427
17447
|
identityRequired && primaryKycVerifiesEmail(config)
|
|
17428
17448
|
);
|
|
17429
17449
|
const hostOwnsSponsorshipConsent = sponsorshipConsent === "host";
|
|
17430
|
-
|
|
17450
|
+
React39.useEffect(() => {
|
|
17431
17451
|
if (hostOwnsSponsorshipConsent && pendingSponsorship) {
|
|
17432
17452
|
discardSponsorship();
|
|
17433
17453
|
}
|
|
17434
17454
|
}, [hostOwnsSponsorshipConsent, pendingSponsorship, discardSponsorship]);
|
|
17455
|
+
if (!planApplicable && ["/onboarding", "/onboarding/pricing", "/onboarding/plan", "/onboarding/card"].includes(pathname)) {
|
|
17456
|
+
return /* @__PURE__ */ jsx(WizardRedirect, { to: "/onboarding/choose", replace: true });
|
|
17457
|
+
}
|
|
17435
17458
|
const sponsorshipContext = !hostOwnsSponsorshipConsent && !!effectivePlatform && (pendingSponsorship !== null || authService.isAuthenticated() && !authService.hasExactSponsoredSession(effectivePlatform));
|
|
17436
17459
|
const exactSponsorship = !!effectivePlatform && authService.hasExactSponsoredSession(effectivePlatform);
|
|
17437
17460
|
const gateCanAnswer = authService.isAuthenticated() && !!tokenManager.getAccessToken();
|
|
@@ -17515,7 +17538,7 @@ function WizardRouter({
|
|
|
17515
17538
|
}
|
|
17516
17539
|
);
|
|
17517
17540
|
if (pathname === "/onboarding/welcome")
|
|
17518
|
-
return /* @__PURE__ */ jsx(OnboardingWelcomeMoment, { chrome });
|
|
17541
|
+
return /* @__PURE__ */ jsx(OnboardingWelcomeMoment, { chrome, deferAccountOpening: billingMode === "host" });
|
|
17519
17542
|
if (pathname === "/onboarding")
|
|
17520
17543
|
return /* @__PURE__ */ jsx(SelectPlan, { chrome, platformPlansAvailable: !!onSelectPlatform });
|
|
17521
17544
|
if (pathname.startsWith("/onboarding/"))
|
|
@@ -17643,7 +17666,7 @@ function builtinProviderDisplayName(id) {
|
|
|
17643
17666
|
}
|
|
17644
17667
|
}
|
|
17645
17668
|
function useProviderDisplayName(config) {
|
|
17646
|
-
return
|
|
17669
|
+
return React39.useCallback(
|
|
17647
17670
|
(id) => {
|
|
17648
17671
|
const labelled = config?.kyc?.settings?.[id]?.label ?? config?.auth?.settings?.[id]?.label;
|
|
17649
17672
|
const trimmed = typeof labelled === "string" ? labelled.trim() : "";
|
|
@@ -17979,7 +18002,7 @@ var OnboardingPolicySection = ({
|
|
|
17979
18002
|
)
|
|
17980
18003
|
] }) }) : /* @__PURE__ */ jsxs("div", { className: "space-y-3", children: [
|
|
17981
18004
|
/* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-x-2.5 gap-y-1.5 rounded-lg border border-primary/20 bg-primary/[0.04] px-3.5 py-2.5", children: [
|
|
17982
|
-
journeySteps.map((step, i) => /* @__PURE__ */ jsxs(
|
|
18005
|
+
journeySteps.map((step, i) => /* @__PURE__ */ jsxs(React39.Fragment, { children: [
|
|
17983
18006
|
i > 0 && /* @__PURE__ */ jsx("span", { "aria-hidden": true, className: "text-[12px] text-text-muted/60", children: "\u203A" }),
|
|
17984
18007
|
/* @__PURE__ */ jsxs("span", { className: "inline-flex items-center gap-1.5", children: [
|
|
17985
18008
|
/* @__PURE__ */ jsx("span", { className: "flex h-4 w-4 items-center justify-center rounded-full bg-primary/20 text-[9px] font-bold text-primary", children: i + 1 }),
|
|
@@ -21167,11 +21190,11 @@ var SaveButton = ({ onClick, busy, disabled, saved = false, classNames }) => /*
|
|
|
21167
21190
|
);
|
|
21168
21191
|
function useSavedFlash(ms = 1800) {
|
|
21169
21192
|
const [saved, setSaved] = useState(false);
|
|
21170
|
-
const timer =
|
|
21193
|
+
const timer = React39.useRef(null);
|
|
21171
21194
|
useEffect(() => () => {
|
|
21172
21195
|
if (timer.current) clearTimeout(timer.current);
|
|
21173
21196
|
}, []);
|
|
21174
|
-
const flash =
|
|
21197
|
+
const flash = React39.useCallback(() => {
|
|
21175
21198
|
setSaved(true);
|
|
21176
21199
|
if (timer.current) clearTimeout(timer.current);
|
|
21177
21200
|
timer.current = setTimeout(() => setSaved(false), ms);
|
|
@@ -24924,17 +24947,17 @@ function ActiveEnvironmentBadge({
|
|
|
24924
24947
|
configuredTestChains
|
|
24925
24948
|
);
|
|
24926
24949
|
const canChoose = Boolean(activeChainId && options.length > 1);
|
|
24927
|
-
const [busyChainId, setBusyChainId] =
|
|
24928
|
-
const [pendingLiveChainId, setPendingLiveChainId] =
|
|
24929
|
-
const [error, setError] =
|
|
24930
|
-
const switchingRef =
|
|
24931
|
-
const confirmLiveRef =
|
|
24932
|
-
const liveWarningId =
|
|
24950
|
+
const [busyChainId, setBusyChainId] = React39.useState(null);
|
|
24951
|
+
const [pendingLiveChainId, setPendingLiveChainId] = React39.useState(null);
|
|
24952
|
+
const [error, setError] = React39.useState(null);
|
|
24953
|
+
const switchingRef = React39.useRef(false);
|
|
24954
|
+
const confirmLiveRef = React39.useRef(null);
|
|
24955
|
+
const liveWarningId = React39.useId();
|
|
24933
24956
|
const label = modeLabel(environment.mode);
|
|
24934
24957
|
const modeCounts = { test: 0, live: 0, unknown: 0 };
|
|
24935
24958
|
for (const option of options) modeCounts[option.mode] += 1;
|
|
24936
24959
|
const pendingLive = options.find((option) => option.chainId === pendingLiveChainId) ?? null;
|
|
24937
|
-
|
|
24960
|
+
React39.useEffect(() => {
|
|
24938
24961
|
if (pendingLiveChainId) confirmLiveRef.current?.focus();
|
|
24939
24962
|
}, [pendingLiveChainId]);
|
|
24940
24963
|
async function switchTo(option) {
|
|
@@ -25694,7 +25717,7 @@ function WalletMenu({
|
|
|
25694
25717
|
const secondaryItems = items.filter((item) => item.placement === "secondary");
|
|
25695
25718
|
const activeActor = actors.find((actor) => actor.active) ?? actors[0];
|
|
25696
25719
|
const userName = identity.name ?? "You";
|
|
25697
|
-
const renderCard = (cardItems) => /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-[24px] border border-border-light bg-raised shadow-sm", children: cardItems.map((item, index) => /* @__PURE__ */ jsxs(
|
|
25720
|
+
const renderCard = (cardItems) => /* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-[24px] border border-border-light bg-raised shadow-sm", children: cardItems.map((item, index) => /* @__PURE__ */ jsxs(React39.Fragment, { children: [
|
|
25698
25721
|
index > 0 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-t border-border-light" }),
|
|
25699
25722
|
/* @__PURE__ */ jsx(
|
|
25700
25723
|
WalletMenuRow,
|
|
@@ -25944,7 +25967,7 @@ function ActorsPane({
|
|
|
25944
25967
|
error && /* @__PURE__ */ jsx(ErrorBanner, { children: error }),
|
|
25945
25968
|
/* @__PURE__ */ jsx("div", { className: "overflow-hidden rounded-[22px] border border-border-light bg-raised", children: actors.map((actor, index) => {
|
|
25946
25969
|
const ActorIcon = actor.icon;
|
|
25947
|
-
return /* @__PURE__ */ jsxs(
|
|
25970
|
+
return /* @__PURE__ */ jsxs(React39.Fragment, { children: [
|
|
25948
25971
|
index > 0 && /* @__PURE__ */ jsx("div", { className: "mx-4 border-t border-border-light" }),
|
|
25949
25972
|
/* @__PURE__ */ jsxs(
|
|
25950
25973
|
"button",
|
|
@@ -29768,25 +29791,25 @@ function BusinessVerificationSection({
|
|
|
29768
29791
|
initialStatus
|
|
29769
29792
|
}) {
|
|
29770
29793
|
const { config } = useProviderConfig();
|
|
29771
|
-
const [status, setStatus] =
|
|
29772
|
-
const [flowInstance, setFlowInstance] =
|
|
29773
|
-
const [error, setError] =
|
|
29774
|
-
const [busy, setBusy] =
|
|
29775
|
-
const kybInstances =
|
|
29794
|
+
const [status, setStatus] = React39.useState(initialStatus ?? "not_required");
|
|
29795
|
+
const [flowInstance, setFlowInstance] = React39.useState(null);
|
|
29796
|
+
const [error, setError] = React39.useState(null);
|
|
29797
|
+
const [busy, setBusy] = React39.useState(false);
|
|
29798
|
+
const kybInstances = React39.useMemo(
|
|
29776
29799
|
() => (config?.kyc.enabled ?? []).filter(
|
|
29777
29800
|
(id) => config?.kyc.settings[id]?.subject === "group"
|
|
29778
29801
|
),
|
|
29779
29802
|
[config]
|
|
29780
29803
|
);
|
|
29781
29804
|
const entityDefault = config?.kyc.entity_default_profile ?? null;
|
|
29782
|
-
const refreshStatus =
|
|
29805
|
+
const refreshStatus = React39.useCallback(async () => {
|
|
29783
29806
|
try {
|
|
29784
29807
|
const s = await getIdentityStatus({ groupId });
|
|
29785
29808
|
setStatus(s.status === "unverified" ? "unverified" : s.status);
|
|
29786
29809
|
} catch {
|
|
29787
29810
|
}
|
|
29788
29811
|
}, [groupId]);
|
|
29789
|
-
|
|
29812
|
+
React39.useEffect(() => {
|
|
29790
29813
|
if (initialStatus !== void 0) setStatus(initialStatus);
|
|
29791
29814
|
}, [initialStatus]);
|
|
29792
29815
|
const startFlow = async (bindFirst) => {
|
|
@@ -30974,7 +30997,7 @@ var IncomingPaymentsInbox = ({
|
|
|
30974
30997
|
...hookOptions
|
|
30975
30998
|
}) => {
|
|
30976
30999
|
const inbox = useIncomingPayments(hookOptions);
|
|
30977
|
-
const allPayments =
|
|
31000
|
+
const allPayments = React39.useMemo(
|
|
30978
31001
|
() => [
|
|
30979
31002
|
...inbox.payments,
|
|
30980
31003
|
...inbox.contracts.flatMap((c) => c.payments ?? [])
|
package/package.json
CHANGED