@swype-org/react-sdk 0.1.206 → 0.1.207
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 +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -1905,6 +1905,7 @@ function paymentReducer(state, action) {
|
|
|
1905
1905
|
...state,
|
|
1906
1906
|
selectedAccountId: action.accountId,
|
|
1907
1907
|
selectedWalletId: action.walletId,
|
|
1908
|
+
selectedTokenSymbol: null,
|
|
1908
1909
|
step: "deposit"
|
|
1909
1910
|
};
|
|
1910
1911
|
case "SELECT_TOKEN":
|
|
@@ -3888,6 +3889,7 @@ function DepositScreen({
|
|
|
3888
3889
|
const selectedAccount = accounts?.find((a) => a.id === selectedAccountId);
|
|
3889
3890
|
const selectedProviderName = selectedAccount?.name ?? "Wallet";
|
|
3890
3891
|
const selectedProviderLogo = KNOWN_LOGOS[selectedProviderName.toLowerCase()];
|
|
3892
|
+
const totalAccountBalance = selectedAccount ? selectedAccount.wallets.reduce((sum, w) => sum + w.balance.available.amount, 0) : availableBalance;
|
|
3891
3893
|
const isLowBalance = availableBalance < MIN_DEPOSIT;
|
|
3892
3894
|
const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
|
|
3893
3895
|
const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
|
|
@@ -3934,7 +3936,7 @@ function DepositScreen({
|
|
|
3934
3936
|
selectedProviderLogo ? /* @__PURE__ */ jsxRuntime.jsx("img", { src: selectedProviderLogo, alt: selectedProviderName, style: providerLogoStyle }) : /* @__PURE__ */ jsxRuntime.jsx("div", { style: providerFallbackStyle(tokens.textMuted), children: selectedProviderName.charAt(0) }),
|
|
3935
3937
|
/* @__PURE__ */ jsxRuntime.jsxs("span", { style: walletBalanceStyle(tokens.text), children: [
|
|
3936
3938
|
"$",
|
|
3937
|
-
|
|
3939
|
+
totalAccountBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3938
3940
|
] }),
|
|
3939
3941
|
/* @__PURE__ */ jsxRuntime.jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.4 }, children: /* @__PURE__ */ jsxRuntime.jsx("path", { d: "M7 10l5-5 5 5M7 14l5 5 5-5", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3940
3942
|
]
|