@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.js
CHANGED
|
@@ -1902,6 +1902,7 @@ function paymentReducer(state, action) {
|
|
|
1902
1902
|
...state,
|
|
1903
1903
|
selectedAccountId: action.accountId,
|
|
1904
1904
|
selectedWalletId: action.walletId,
|
|
1905
|
+
selectedTokenSymbol: null,
|
|
1905
1906
|
step: "deposit"
|
|
1906
1907
|
};
|
|
1907
1908
|
case "SELECT_TOKEN":
|
|
@@ -3885,6 +3886,7 @@ function DepositScreen({
|
|
|
3885
3886
|
const selectedAccount = accounts?.find((a) => a.id === selectedAccountId);
|
|
3886
3887
|
const selectedProviderName = selectedAccount?.name ?? "Wallet";
|
|
3887
3888
|
const selectedProviderLogo = KNOWN_LOGOS[selectedProviderName.toLowerCase()];
|
|
3889
|
+
const totalAccountBalance = selectedAccount ? selectedAccount.wallets.reduce((sum, w) => sum + w.balance.available.amount, 0) : availableBalance;
|
|
3888
3890
|
const isLowBalance = availableBalance < MIN_DEPOSIT;
|
|
3889
3891
|
const exceedsLimit = remainingLimit != null && amount > remainingLimit && !isLowBalance;
|
|
3890
3892
|
const canDeposit = amount >= MIN_DEPOSIT && !exceedsLimit && !isLowBalance && !processing;
|
|
@@ -3931,7 +3933,7 @@ function DepositScreen({
|
|
|
3931
3933
|
selectedProviderLogo ? /* @__PURE__ */ jsx("img", { src: selectedProviderLogo, alt: selectedProviderName, style: providerLogoStyle }) : /* @__PURE__ */ jsx("div", { style: providerFallbackStyle(tokens.textMuted), children: selectedProviderName.charAt(0) }),
|
|
3932
3934
|
/* @__PURE__ */ jsxs("span", { style: walletBalanceStyle(tokens.text), children: [
|
|
3933
3935
|
"$",
|
|
3934
|
-
|
|
3936
|
+
totalAccountBalance.toLocaleString("en-US", { minimumFractionDigits: 2, maximumFractionDigits: 2 })
|
|
3935
3937
|
] }),
|
|
3936
3938
|
/* @__PURE__ */ jsx("svg", { width: "14", height: "14", viewBox: "0 0 24 24", fill: "none", style: { opacity: 0.4 }, children: /* @__PURE__ */ jsx("path", { d: "M7 10l5-5 5 5M7 14l5 5 5-5", stroke: tokens.textMuted, strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }) })
|
|
3937
3939
|
]
|