@pollar/react 0.12.1-rc.7 → 0.12.1-rc.9
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.css +13 -0
- package/dist/index.css.map +1 -1
- package/dist/index.d.mts +5 -1
- package/dist/index.d.ts +5 -1
- package/dist/index.js +68 -33
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +68 -33
- package/dist/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/index.mjs
CHANGED
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
import { AUTH_ERROR_CODES, rampLegTitle, rampRequirementCopy, rampTrustlineAsset, rampWalletStep, rampResolutionText, describeRampAction, rampLegStatus, rampNextApproval, rampOrderStopped, rampOrderReceive, countryName, rampRailLabel, rampNoRouteText, rampFieldError, rampFieldValid, rampLegNote, rampStepTitle, rampStepStatusText, rampLegTimeLeft, rampOrderResolutionText, rampCountries, rampQuoteFields, isPollarApiError, transactionErrorMessage, WalletType, bridgeSourceChains, bridgeTargetChains, isBridgeSettled, isPollarClient, PollarClient, isInteractiveAuthAdapter, isAuthEntryAdapterStep, completeAuthEntryStep, rampTrustlineErrorText, isPollarNetworkError, toBaseUnits, resolveLanguage, languageFromTag, localizedText, appUnavailableMessage, cosignRefusalMessage, fromBaseUnits, assertRampStellarSigner } from '@pollar/core';
|
|
3
3
|
import { createContext, forwardRef, useState, useCallback, useEffect, useMemo, useRef, useContext, useSyncExternalStore, Component } from 'react';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
|
+
import { createPortal } from 'react-dom';
|
|
5
6
|
import { startAuthentication, startRegistration } from '@simplewebauthn/browser';
|
|
6
7
|
|
|
7
8
|
var __create = Object.create;
|
|
@@ -1279,7 +1280,7 @@ var PollarModalFooter = ({ language: languageProp }) => {
|
|
|
1279
1280
|
/* @__PURE__ */ jsx("img", { src: LOGO_POLLAR_WORDMARK_ON_DARK, alt: "Pollar", className: "pollar-footer-logo pollar-logo-on-dark" }),
|
|
1280
1281
|
/* @__PURE__ */ jsxs("span", { className: "pollar-footer-version", children: [
|
|
1281
1282
|
"v",
|
|
1282
|
-
"0.12.1-rc.
|
|
1283
|
+
"0.12.1-rc.9"
|
|
1283
1284
|
] })
|
|
1284
1285
|
] });
|
|
1285
1286
|
};
|
|
@@ -1796,6 +1797,20 @@ function DistributionRulesModalTemplate({
|
|
|
1796
1797
|
}
|
|
1797
1798
|
);
|
|
1798
1799
|
}
|
|
1800
|
+
var noSubscription = () => () => {
|
|
1801
|
+
};
|
|
1802
|
+
function PollarOverlay({ style, onClick, children }) {
|
|
1803
|
+
const canPortal = useSyncExternalStore(
|
|
1804
|
+
noSubscription,
|
|
1805
|
+
() => true,
|
|
1806
|
+
() => false
|
|
1807
|
+
);
|
|
1808
|
+
if (!canPortal) return null;
|
|
1809
|
+
return createPortal(
|
|
1810
|
+
/* @__PURE__ */ jsx("div", { className: "pollar-overlay", "data-react-aria-top-layer": "true", style, onClick, children }),
|
|
1811
|
+
document.body
|
|
1812
|
+
);
|
|
1813
|
+
}
|
|
1799
1814
|
function DistributionRulesModal({ onClose }) {
|
|
1800
1815
|
const { getClient, styles } = usePollar();
|
|
1801
1816
|
const { theme, accentColor, styleOverrides, overlayStyle } = modalChrome(styles);
|
|
@@ -1843,7 +1858,7 @@ function DistributionRulesModal({ onClose }) {
|
|
|
1843
1858
|
},
|
|
1844
1859
|
[getClient, copy]
|
|
1845
1860
|
);
|
|
1846
|
-
return /* @__PURE__ */ jsx(
|
|
1861
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
1847
1862
|
DistributionRulesModalTemplate,
|
|
1848
1863
|
{
|
|
1849
1864
|
theme,
|
|
@@ -2341,7 +2356,7 @@ function EnabledAssetsModal({ onClose }) {
|
|
|
2341
2356
|
},
|
|
2342
2357
|
[runAction]
|
|
2343
2358
|
);
|
|
2344
|
-
return /* @__PURE__ */ jsx(
|
|
2359
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: view === "list" ? /* @__PURE__ */ jsx(
|
|
2345
2360
|
EnabledAssetsModalTemplate,
|
|
2346
2361
|
{
|
|
2347
2362
|
theme,
|
|
@@ -2930,7 +2945,7 @@ function KycModal({
|
|
|
2930
2945
|
if (selectedProvider) void handleSelectProvider(selectedProvider);
|
|
2931
2946
|
else setStep("select_provider");
|
|
2932
2947
|
}
|
|
2933
|
-
return /* @__PURE__ */ jsx(
|
|
2948
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
2934
2949
|
KycModalTemplate,
|
|
2935
2950
|
{
|
|
2936
2951
|
theme,
|
|
@@ -3089,7 +3104,7 @@ function RequirementFormModal({
|
|
|
3089
3104
|
if (mounted.current) setSubmitting(false);
|
|
3090
3105
|
}
|
|
3091
3106
|
}
|
|
3092
|
-
return /* @__PURE__ */ jsx(
|
|
3107
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
3093
3108
|
"div",
|
|
3094
3109
|
{
|
|
3095
3110
|
className: "pollar-modal-card pollar-form-modal",
|
|
@@ -4062,7 +4077,7 @@ function LoginModal({ onClose }) {
|
|
|
4062
4077
|
getClient().login({ provider });
|
|
4063
4078
|
}
|
|
4064
4079
|
}
|
|
4065
|
-
return /* @__PURE__ */ jsx(
|
|
4080
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: handleClose, children: configStatus !== "ready" ? /* @__PURE__ */ jsx(
|
|
4066
4081
|
LoginModalStatus,
|
|
4067
4082
|
{
|
|
4068
4083
|
status: configStatus === "error" ? "error" : "loading",
|
|
@@ -5615,7 +5630,7 @@ function RegistryCheckModal({
|
|
|
5615
5630
|
/* @__PURE__ */ jsx("span", { className: "pollar-form-label", children: label }),
|
|
5616
5631
|
/* @__PURE__ */ jsx("input", { className: "pollar-input", value, readOnly: true, disabled: true })
|
|
5617
5632
|
] });
|
|
5618
|
-
return /* @__PURE__ */ jsx(
|
|
5633
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
5619
5634
|
"div",
|
|
5620
5635
|
{
|
|
5621
5636
|
className: "pollar-modal-card pollar-form-modal",
|
|
@@ -5795,7 +5810,7 @@ function ProviderRegistrationModal({
|
|
|
5795
5810
|
}
|
|
5796
5811
|
);
|
|
5797
5812
|
}
|
|
5798
|
-
return /* @__PURE__ */ jsx(
|
|
5813
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
5799
5814
|
"div",
|
|
5800
5815
|
{
|
|
5801
5816
|
className: "pollar-modal-card pollar-form-modal",
|
|
@@ -6417,7 +6432,7 @@ function RampWidget({ onClose, language: languageProp, initial }) {
|
|
|
6417
6432
|
}
|
|
6418
6433
|
);
|
|
6419
6434
|
}
|
|
6420
|
-
return /* @__PURE__ */ jsx(
|
|
6435
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
6421
6436
|
RampWidgetTemplate,
|
|
6422
6437
|
{
|
|
6423
6438
|
language,
|
|
@@ -6814,7 +6829,7 @@ function ReceiveModal({ onClose, initial }) {
|
|
|
6814
6829
|
}, 2e3);
|
|
6815
6830
|
});
|
|
6816
6831
|
}
|
|
6817
|
-
return /* @__PURE__ */ jsx(
|
|
6832
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
6818
6833
|
ReceiveModalTemplate,
|
|
6819
6834
|
{
|
|
6820
6835
|
theme,
|
|
@@ -8275,7 +8290,7 @@ function SendModal({ onClose, initial }) {
|
|
|
8275
8290
|
setShowXdr(false);
|
|
8276
8291
|
setCopied(false);
|
|
8277
8292
|
}
|
|
8278
|
-
return /* @__PURE__ */ jsx(
|
|
8293
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: !isInProgress ? onClose : void 0, children: /* @__PURE__ */ jsx(
|
|
8279
8294
|
SendModalTemplate,
|
|
8280
8295
|
{
|
|
8281
8296
|
theme,
|
|
@@ -9295,7 +9310,7 @@ function SwapModal({ onClose, initial }) {
|
|
|
9295
9310
|
setShowXdr(false);
|
|
9296
9311
|
setCopied(false);
|
|
9297
9312
|
}
|
|
9298
|
-
return /* @__PURE__ */ jsx(
|
|
9313
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: !isInProgress ? onClose : void 0, children: /* @__PURE__ */ jsx(
|
|
9299
9314
|
SwapModalTemplate,
|
|
9300
9315
|
{
|
|
9301
9316
|
theme,
|
|
@@ -9929,7 +9944,7 @@ function BridgeModal({ onClose, initial }) {
|
|
|
9929
9944
|
void refreshWalletBalance();
|
|
9930
9945
|
}
|
|
9931
9946
|
const step = transfer ? "transfer" : !config && !configError ? "loading" : config && (!config.available || sources.length === 0) ? "unavailable" : "form";
|
|
9932
|
-
return /* @__PURE__ */ jsx(
|
|
9947
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
9933
9948
|
BridgeModalTemplate,
|
|
9934
9949
|
{
|
|
9935
9950
|
theme,
|
|
@@ -10288,7 +10303,7 @@ function EarnModal({ onClose, initial }) {
|
|
|
10288
10303
|
}
|
|
10289
10304
|
}
|
|
10290
10305
|
const title = step === "form" ? copy.title : txTitle;
|
|
10291
|
-
return /* @__PURE__ */ jsx(
|
|
10306
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: !isInProgress ? onClose : void 0, children: /* @__PURE__ */ jsxs(
|
|
10292
10307
|
"div",
|
|
10293
10308
|
{
|
|
10294
10309
|
className: "pollar-modal-card pollar-send-modal",
|
|
@@ -11413,7 +11428,7 @@ function CardModal({ onClose, initial }) {
|
|
|
11413
11428
|
const blocked = requirements?.next ? blockedStepMessage(requirements.next, copy.blocked) : null;
|
|
11414
11429
|
const stepsPending = !!requirements?.next;
|
|
11415
11430
|
const title = panel === "fund" ? copy.title.addFunds : card ? card.nickname ?? copy.title.yourCard : copy.title.getCard;
|
|
11416
|
-
return /* @__PURE__ */ jsx(
|
|
11431
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsxs(
|
|
11417
11432
|
"div",
|
|
11418
11433
|
{
|
|
11419
11434
|
className: "pollar-modal-card pollar-card-modal",
|
|
@@ -12089,7 +12104,7 @@ function SessionsModal({ onClose }) {
|
|
|
12089
12104
|
setSigningOutEverywhere(false);
|
|
12090
12105
|
}
|
|
12091
12106
|
}, [getClient, onClose]);
|
|
12092
|
-
return /* @__PURE__ */ jsx(
|
|
12107
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
12093
12108
|
SessionsModalTemplate,
|
|
12094
12109
|
{
|
|
12095
12110
|
theme,
|
|
@@ -12168,6 +12183,8 @@ var COSIGN_COPY = {
|
|
|
12168
12183
|
approve: "Approve",
|
|
12169
12184
|
approving: "Approving...",
|
|
12170
12185
|
genericError: "Something went wrong. Please try again.",
|
|
12186
|
+
deviceNotLinked: "This device isn't linked to your wallet yet, so it can't approve. Add it with a device that already is, your passkey or your email.",
|
|
12187
|
+
linkDevice: "Link this device",
|
|
12171
12188
|
transaction: "Transaction",
|
|
12172
12189
|
operations: {
|
|
12173
12190
|
payment: "Send",
|
|
@@ -12207,6 +12224,8 @@ var COSIGN_COPY = {
|
|
|
12207
12224
|
approve: "Aprobar",
|
|
12208
12225
|
approving: "Aprobando...",
|
|
12209
12226
|
genericError: "Algo sali\xF3 mal. Intenta de nuevo.",
|
|
12227
|
+
deviceNotLinked: "Este dispositivo a\xFAn no est\xE1 vinculado a tu billetera, as\xED que no puede aprobar. Agr\xE9galo con un dispositivo que ya lo est\xE9, tu passkey o tu email.",
|
|
12228
|
+
linkDevice: "Vincular este dispositivo",
|
|
12210
12229
|
transaction: "Transacci\xF3n",
|
|
12211
12230
|
operations: {
|
|
12212
12231
|
payment: "Enviar",
|
|
@@ -12246,6 +12265,8 @@ var COSIGN_COPY = {
|
|
|
12246
12265
|
approve: "Aprovar",
|
|
12247
12266
|
approving: "Aprovando...",
|
|
12248
12267
|
genericError: "Algo deu errado. Tente novamente.",
|
|
12268
|
+
deviceNotLinked: "Este dispositivo ainda n\xE3o est\xE1 vinculado \xE0 sua carteira, ent\xE3o n\xE3o pode aprovar. Adicione-o com um dispositivo que j\xE1 esteja, sua passkey ou seu email.",
|
|
12269
|
+
linkDevice: "Vincular este dispositivo",
|
|
12249
12270
|
transaction: "Transa\xE7\xE3o",
|
|
12250
12271
|
operations: {
|
|
12251
12272
|
payment: "Enviar",
|
|
@@ -12291,6 +12312,8 @@ function CosignModalTemplate({
|
|
|
12291
12312
|
busy,
|
|
12292
12313
|
error,
|
|
12293
12314
|
approveBlocked = false,
|
|
12315
|
+
deviceNotLinked = false,
|
|
12316
|
+
onLinkDevice,
|
|
12294
12317
|
lastResolved,
|
|
12295
12318
|
explorerUrl,
|
|
12296
12319
|
closesIn = null,
|
|
@@ -12305,7 +12328,7 @@ function CosignModalTemplate({
|
|
|
12305
12328
|
const language = useInheritedLanguage(languageProp);
|
|
12306
12329
|
const copy = COSIGN_COPY[language];
|
|
12307
12330
|
const cssVars = buildModalCssVars(theme, accentColor, styleOverrides);
|
|
12308
|
-
const verified = verification?.ok === true;
|
|
12331
|
+
const verified = verification?.ok === true && !deviceNotLinked;
|
|
12309
12332
|
const canVote = !!current && verified && !busy && !approveBlocked;
|
|
12310
12333
|
const [verifiedOpenFor, setVerifiedOpenFor] = useState(null);
|
|
12311
12334
|
const verifiedOpen = !!current && verifiedOpenFor === current.id;
|
|
@@ -12390,11 +12413,11 @@ function CosignModalTemplate({
|
|
|
12390
12413
|
current && review && /* @__PURE__ */ jsxs("div", { className: `pollar-cosign-detail${pending.length > 1 ? " pollar-cosign-detail-grouped" : ""}`, children: [
|
|
12391
12414
|
/* @__PURE__ */ jsxs("div", { className: "pollar-cosign-detail-head", children: [
|
|
12392
12415
|
/* @__PURE__ */ jsx("p", { className: "pollar-cosign-detail-title", children: review.title }),
|
|
12393
|
-
!verification && /* @__PURE__ */ jsxs("span", { className: "pollar-cosign-chip", children: [
|
|
12416
|
+
!verification && !deviceNotLinked && /* @__PURE__ */ jsxs("span", { className: "pollar-cosign-chip", children: [
|
|
12394
12417
|
/* @__PURE__ */ jsx("span", { className: "pollar-spinner pollar-spinner-sm", "aria-hidden": true }),
|
|
12395
12418
|
copy.checking
|
|
12396
12419
|
] }),
|
|
12397
|
-
|
|
12420
|
+
verified && /* @__PURE__ */ jsxs(
|
|
12398
12421
|
"button",
|
|
12399
12422
|
{
|
|
12400
12423
|
type: "button",
|
|
@@ -12409,8 +12432,11 @@ function CosignModalTemplate({
|
|
|
12409
12432
|
)
|
|
12410
12433
|
] }),
|
|
12411
12434
|
/* @__PURE__ */ jsx(TxReview, { data: review, language }, current.id),
|
|
12412
|
-
|
|
12413
|
-
|
|
12435
|
+
verified && verifiedOpen && /* @__PURE__ */ jsx("div", { className: "pollar-cosign-verify pollar-cosign-verify-ok", children: copy.checkedAgainstTurnkey }),
|
|
12436
|
+
deviceNotLinked ? /* @__PURE__ */ jsxs("div", { className: "pollar-cosign-verify pollar-cosign-verify-bad", children: [
|
|
12437
|
+
copy.deviceNotLinked,
|
|
12438
|
+
onLinkDevice && /* @__PURE__ */ jsx("button", { type: "button", className: "pollar-cosign-link", onClick: onLinkDevice, children: copy.linkDevice })
|
|
12439
|
+
] }) : verification && !verification.ok && /* @__PURE__ */ jsxs("div", { className: "pollar-cosign-verify pollar-cosign-verify-bad", children: [
|
|
12414
12440
|
copy.notVerified,
|
|
12415
12441
|
" ",
|
|
12416
12442
|
verification.reason
|
|
@@ -12448,7 +12474,7 @@ var CLOSE_AFTER_SECONDS = 3;
|
|
|
12448
12474
|
var CLOSE_AFTER_SENT_SECONDS = 5;
|
|
12449
12475
|
var NEXT_REQUEST_EVERY_MS = 2e3;
|
|
12450
12476
|
function CosignModal({ nextStep = null, onClose }) {
|
|
12451
|
-
const { getClient, styles, network } = usePollar();
|
|
12477
|
+
const { getClient, styles, network, openRecoveryModal } = usePollar();
|
|
12452
12478
|
const { theme, accentColor, styleOverrides, overlayStyle } = modalChrome(styles);
|
|
12453
12479
|
const { pending, lastResolved, loaded, refresh, approve, reject, verify, inspectQuorum } = useCosign();
|
|
12454
12480
|
const language = useModalLanguage();
|
|
@@ -12458,10 +12484,13 @@ function CosignModal({ nextStep = null, onClose }) {
|
|
|
12458
12484
|
const [error, setError] = useState(null);
|
|
12459
12485
|
const [approveFailedFor, setApproveFailedFor] = useState(null);
|
|
12460
12486
|
const [quorumFailure, setQuorumFailure] = useState(null);
|
|
12487
|
+
const [deviceNotLinked, setDeviceNotLinked] = useState(false);
|
|
12461
12488
|
useEffect(() => {
|
|
12462
12489
|
let cancelled = false;
|
|
12463
12490
|
inspectQuorum().then((q) => {
|
|
12464
|
-
if (
|
|
12491
|
+
if (cancelled || q.ok) return;
|
|
12492
|
+
if (q.code === "DEVICE_NOT_ENROLLED") setDeviceNotLinked(true);
|
|
12493
|
+
else setQuorumFailure(q.reason);
|
|
12465
12494
|
}).catch(() => void 0);
|
|
12466
12495
|
return () => {
|
|
12467
12496
|
cancelled = true;
|
|
@@ -12539,7 +12568,7 @@ function CosignModal({ nextStep = null, onClose }) {
|
|
|
12539
12568
|
},
|
|
12540
12569
|
[]
|
|
12541
12570
|
);
|
|
12542
|
-
return /* @__PURE__ */ jsx(
|
|
12571
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
12543
12572
|
CosignModalTemplate,
|
|
12544
12573
|
{
|
|
12545
12574
|
theme,
|
|
@@ -12551,6 +12580,11 @@ function CosignModal({ nextStep = null, onClose }) {
|
|
|
12551
12580
|
busy,
|
|
12552
12581
|
error,
|
|
12553
12582
|
approveBlocked: !!current && approveFailedFor === current.id,
|
|
12583
|
+
deviceNotLinked,
|
|
12584
|
+
onLinkDevice: () => {
|
|
12585
|
+
onClose();
|
|
12586
|
+
openRecoveryModal();
|
|
12587
|
+
},
|
|
12554
12588
|
...lastResolved ? { lastResolved } : {},
|
|
12555
12589
|
closesIn,
|
|
12556
12590
|
nextStep: awaitingNext ? nextStep : null,
|
|
@@ -12569,7 +12603,7 @@ function CosignModal({ nextStep = null, onClose }) {
|
|
|
12569
12603
|
var CUSTODY_MIGRATION_COPY = {
|
|
12570
12604
|
en: {
|
|
12571
12605
|
title: "Move your wallets to this device",
|
|
12572
|
-
intro: "
|
|
12606
|
+
intro: "We are strengthening the security of your account: your wallets move to this device and every signature starts here, from your keys. They move with everything they hold.",
|
|
12573
12607
|
whatMoves: "What moves",
|
|
12574
12608
|
newAddress: "New address",
|
|
12575
12609
|
sameAddress: "Same address",
|
|
@@ -12589,7 +12623,7 @@ var CUSTODY_MIGRATION_COPY = {
|
|
|
12589
12623
|
},
|
|
12590
12624
|
es: {
|
|
12591
12625
|
title: "Mueve tus billeteras a este dispositivo",
|
|
12592
|
-
intro: "
|
|
12626
|
+
intro: "Estamos reforzando la seguridad de tu cuenta: tus billeteras pasan a este dispositivo y cada firma sale desde aqu\xED, con tus llaves. Se mueven con todo lo que contienen.",
|
|
12593
12627
|
whatMoves: "Qu\xE9 se mueve",
|
|
12594
12628
|
newAddress: "Direcci\xF3n nueva",
|
|
12595
12629
|
sameAddress: "Misma direcci\xF3n",
|
|
@@ -12609,7 +12643,7 @@ var CUSTODY_MIGRATION_COPY = {
|
|
|
12609
12643
|
},
|
|
12610
12644
|
pt: {
|
|
12611
12645
|
title: "Mova suas carteiras para este dispositivo",
|
|
12612
|
-
intro: "
|
|
12646
|
+
intro: "Estamos refor\xE7ando a seguran\xE7a da sua conta: suas carteiras passam para este dispositivo e cada assinatura sai daqui, com as suas chaves. Elas v\xEAm com tudo o que cont\xEAm.",
|
|
12613
12647
|
whatMoves: "O que ser\xE1 movido",
|
|
12614
12648
|
newAddress: "Endere\xE7o novo",
|
|
12615
12649
|
sameAddress: "Mesmo endere\xE7o",
|
|
@@ -12723,7 +12757,7 @@ function CustodyMigrationModal({ state, onMoved, onLater }) {
|
|
|
12723
12757
|
setBusy(false);
|
|
12724
12758
|
}
|
|
12725
12759
|
}
|
|
12726
|
-
return /* @__PURE__ */ jsx(
|
|
12760
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, children: /* @__PURE__ */ jsx(
|
|
12727
12761
|
CustodyMigrationModalTemplate,
|
|
12728
12762
|
{
|
|
12729
12763
|
theme,
|
|
@@ -13246,7 +13280,7 @@ function RecoveryModal({ onClose }) {
|
|
|
13246
13280
|
[load]
|
|
13247
13281
|
);
|
|
13248
13282
|
const enrolled = !!thisDeviceKey && !!devices?.devices.some((d) => d.publicKey.toLowerCase() === thisDeviceKey);
|
|
13249
|
-
return /* @__PURE__ */ jsx(
|
|
13283
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
13250
13284
|
RecoveryModalTemplate,
|
|
13251
13285
|
{
|
|
13252
13286
|
theme,
|
|
@@ -13392,7 +13426,7 @@ function ConfirmModal({ confirmation }) {
|
|
|
13392
13426
|
if (authState.step === "idle") rejectRef.current();
|
|
13393
13427
|
});
|
|
13394
13428
|
}, [getClient]);
|
|
13395
|
-
return /* @__PURE__ */ jsx(
|
|
13429
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: confirmation.reject, children: /* @__PURE__ */ jsxs(
|
|
13396
13430
|
"div",
|
|
13397
13431
|
{
|
|
13398
13432
|
className: "pollar-modal-card pollar-cosign-modal",
|
|
@@ -13522,7 +13556,7 @@ function TransactionModal({ onClose }) {
|
|
|
13522
13556
|
await getClient().signAndSubmitTx(transaction.buildData.unsignedXdr);
|
|
13523
13557
|
}
|
|
13524
13558
|
}
|
|
13525
|
-
return /* @__PURE__ */ jsx(
|
|
13559
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
13526
13560
|
TransactionModalTemplate,
|
|
13527
13561
|
{
|
|
13528
13562
|
theme,
|
|
@@ -13904,7 +13938,7 @@ function TxHistoryModal({ onClose, initial }) {
|
|
|
13904
13938
|
const paged = (nextOffset) => {
|
|
13905
13939
|
if (selectedChain) load(nextOffset, selectedChain);
|
|
13906
13940
|
};
|
|
13907
|
-
return /* @__PURE__ */ jsx(
|
|
13941
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
13908
13942
|
TxHistoryModalTemplate,
|
|
13909
13943
|
{
|
|
13910
13944
|
theme,
|
|
@@ -14135,7 +14169,7 @@ function WalletBalanceModal({ onClose }) {
|
|
|
14135
14169
|
useEffect(() => {
|
|
14136
14170
|
void refreshWalletBalance();
|
|
14137
14171
|
}, [refreshWalletBalance]);
|
|
14138
|
-
return /* @__PURE__ */ jsx(
|
|
14172
|
+
return /* @__PURE__ */ jsx(PollarOverlay, { style: overlayStyle, onClick: onClose, children: /* @__PURE__ */ jsx(
|
|
14139
14173
|
WalletBalanceModalTemplate,
|
|
14140
14174
|
{
|
|
14141
14175
|
theme,
|
|
@@ -14459,6 +14493,7 @@ function PollarProvider({
|
|
|
14459
14493
|
if (cosign.pending.length > cosignPendingCount.current) setCosignModalOpen(true);
|
|
14460
14494
|
cosignPendingCount.current = cosign.pending.length;
|
|
14461
14495
|
}, [cosign.pending.length]);
|
|
14496
|
+
useEffect(() => pollarClient.onCosignDeviceNotEnrolled(() => setRecoveryModalOpen(true)), [pollarClient]);
|
|
14462
14497
|
const [distributionRulesModalOpen, setDistributionRulesModalOpen] = useState(false);
|
|
14463
14498
|
useEffect(
|
|
14464
14499
|
() => pollarClient.onAuthStateChange((authState) => {
|