terry-wallet-login #15

Merged
terry merged 95 commits from terry-wallet-login into terry-staging 2026-06-05 16:32:43 +00:00
Showing only changes of commit fd19ed438e - Show all commits

View File

@@ -53,7 +53,7 @@ export function WalletLoginModal() {
const { t } = useI18n();
const { closeLoginModal, completeLogin, loginModalOpen } = useWallet();
const [selected, setSelected] = useState<WalletKind | null>(null);
const [mobileDevice, setMobileDevice] = useState(false);
const [mobileDevice, setMobileDevice] = useState(() => isMobileDevice());
const [state, setState] = useState<LoginState>("idle");
const [error, setError] = useState("");
const [pendingLogin, setPendingLogin] = useState<PendingLogin | null>(null);
@@ -74,6 +74,9 @@ export function WalletLoginModal() {
t(key).replaceAll("{wallet}", walletName(kind));
const walletHint = () =>
mobileDevice ? t("walletChooseMobile") : t("walletDesktopHint");
const visibleWallets = mobileDevice
? wallets
: wallets.filter(supportsDesktopExtension);
const busy = state !== "idle";
const close = () => {
@@ -179,7 +182,7 @@ export function WalletLoginModal() {
</div>
<div className="mt-5 grid gap-2">
{wallets.map((kind) => {
{visibleWallets.map((kind) => {
const active = selected === kind;
const connecting = active && state === "connecting";
return (