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