@swype-org/react-sdk 0.1.204 → 0.1.205
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 +6 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +6 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -807,8 +807,10 @@ interface TokenPickerScreenProps {
|
|
|
807
807
|
depositAmount?: number;
|
|
808
808
|
/** Currently selected token symbol, e.g. "USDC" or "USDT" */
|
|
809
809
|
selectedTokenSymbol?: string;
|
|
810
|
+
/** Currently selected wallet ID so we can identify the active token across chains */
|
|
811
|
+
selectedWalletId?: string;
|
|
810
812
|
}
|
|
811
|
-
declare function TokenPickerScreen({ account, chains, onSelectAuthorized, onAuthorizeToken, onBack, onLogout, depositAmount, selectedTokenSymbol, }: TokenPickerScreenProps): react_jsx_runtime.JSX.Element;
|
|
813
|
+
declare function TokenPickerScreen({ account, chains, onSelectAuthorized, onAuthorizeToken, onBack, onLogout, depositAmount, selectedTokenSymbol, selectedWalletId, }: TokenPickerScreenProps): react_jsx_runtime.JSX.Element;
|
|
812
814
|
|
|
813
815
|
type FlowPhase = 'link' | 'deposit';
|
|
814
816
|
|
package/dist/index.d.ts
CHANGED
|
@@ -807,8 +807,10 @@ interface TokenPickerScreenProps {
|
|
|
807
807
|
depositAmount?: number;
|
|
808
808
|
/** Currently selected token symbol, e.g. "USDC" or "USDT" */
|
|
809
809
|
selectedTokenSymbol?: string;
|
|
810
|
+
/** Currently selected wallet ID so we can identify the active token across chains */
|
|
811
|
+
selectedWalletId?: string;
|
|
810
812
|
}
|
|
811
|
-
declare function TokenPickerScreen({ account, chains, onSelectAuthorized, onAuthorizeToken, onBack, onLogout, depositAmount, selectedTokenSymbol, }: TokenPickerScreenProps): react_jsx_runtime.JSX.Element;
|
|
813
|
+
declare function TokenPickerScreen({ account, chains, onSelectAuthorized, onAuthorizeToken, onBack, onLogout, depositAmount, selectedTokenSymbol, selectedWalletId, }: TokenPickerScreenProps): react_jsx_runtime.JSX.Element;
|
|
812
814
|
|
|
813
815
|
type FlowPhase = 'link' | 'deposit';
|
|
814
816
|
|
package/dist/index.js
CHANGED
|
@@ -5243,7 +5243,8 @@ function TokenPickerScreen({
|
|
|
5243
5243
|
onBack,
|
|
5244
5244
|
onLogout,
|
|
5245
5245
|
depositAmount,
|
|
5246
|
-
selectedTokenSymbol
|
|
5246
|
+
selectedTokenSymbol,
|
|
5247
|
+
selectedWalletId
|
|
5247
5248
|
}) {
|
|
5248
5249
|
const { tokens: t } = useSwypeConfig();
|
|
5249
5250
|
const entries = [];
|
|
@@ -5299,6 +5300,7 @@ function TokenPickerScreen({
|
|
|
5299
5300
|
/* @__PURE__ */ jsx("div", { style: sectionLabelStyle(t.textMuted), children: "Choose token" }),
|
|
5300
5301
|
/* @__PURE__ */ jsx("div", { style: tokenListStyle2, children: entries.map((entry) => {
|
|
5301
5302
|
const authorized = entry.status === "AUTHORIZED";
|
|
5303
|
+
const isSelected = entry.walletId === selectedWalletId && entry.tokenSymbol === selectedTokenSymbol;
|
|
5302
5304
|
return /* @__PURE__ */ jsxs(
|
|
5303
5305
|
"button",
|
|
5304
5306
|
{
|
|
@@ -5321,7 +5323,7 @@ function TokenPickerScreen({
|
|
|
5321
5323
|
!authorized && /* @__PURE__ */ jsx("span", { style: notAuthorizedStyle(t.textMuted), children: "Not authorized" })
|
|
5322
5324
|
] })
|
|
5323
5325
|
] }),
|
|
5324
|
-
/* @__PURE__ */ jsx("div", { style:
|
|
5326
|
+
/* @__PURE__ */ jsx("div", { style: isSelected ? selectCircleSelectedStyle(t.accent) : selectCircleStyle(t.border), children: isSelected && /* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", children: /* @__PURE__ */ jsx("path", { d: "M9 16.17L4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41L9 16.17z", fill: "#fff" }) }) })
|
|
5325
5327
|
]
|
|
5326
5328
|
},
|
|
5327
5329
|
`${entry.walletId}-${entry.tokenSymbol}-${entry.chainName}`
|
|
@@ -5730,7 +5732,8 @@ function StepRendererContent({
|
|
|
5730
5732
|
onBack: () => handlers.onNavigate(state.previousStep === "setup" ? "setup" : "deposit"),
|
|
5731
5733
|
onLogout: handlers.onLogout,
|
|
5732
5734
|
depositAmount: depositAmount ?? void 0,
|
|
5733
|
-
selectedTokenSymbol: selectedSource?.token.symbol
|
|
5735
|
+
selectedTokenSymbol: selectedSource?.token.symbol,
|
|
5736
|
+
selectedWalletId: state.selectedWalletId
|
|
5734
5737
|
}
|
|
5735
5738
|
);
|
|
5736
5739
|
}
|