Skip to content

Commit

Permalink
feat: update wallet flow
Browse files Browse the repository at this point in the history
  • Loading branch information
brolag committed Feb 21, 2025
1 parent 5b86cb8 commit 6733202
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 14 deletions.
5 changes: 3 additions & 2 deletions apps/web/public/locales/en/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@
"welcome_to": "Welcome to",
"sign": "Sign",
"disconnect": "Disconnect",
"connect_wallet": "Connect {{walletName}}",
"connect_wallet": "Connect your wallet",
"argent_x": "Argent X",
"argent_mobile": "Argent Mobile",
"error_signing_message": "Error signing the message",

"tag_new": "New",
"welcome_coffee_lover": "Welcome Coffee Lover",
"featured": "Featured",
"find_best_coffee": "Find Best Coffee",
"find_best_coffee": "Find the Best Coffee",
"popular": "Popular",
"discover_unique_blends": "Discover Unique Blends",

Expand Down
3 changes: 2 additions & 1 deletion apps/web/public/locales/es/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
"welcome_to": "Bienvenido a",
"sign": "Firmar",
"disconnect": "Desconectar",
"connect_wallet": "Conectar {{walletName}}",
"connect_wallet": "Conectar billetera",
"argent_x": "Argent X",
"argent_mobile": "Argent Mobile",
"error_signing_message": "Error al firmar el mensaje",

"tag_new": "Nuevo",
Expand Down
1 change: 1 addition & 0 deletions apps/web/public/locales/pt/common.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
"disconnect": "Desconectar",
"connect_wallet": "Conectar {{walletName}}",
"argent_x": "Argent X",
"argent_mobile": "Argent Mobile",
"error_signing_message": "Erro ao assinar a mensagem",

"tag_new": "Novo",
Expand Down
5 changes: 0 additions & 5 deletions apps/web/src/app/_components/features/WalletConnectFlow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,11 +67,6 @@ export default function WalletConnectFlow() {

return (
<div className="p-6 space-y-6">
<div className="text-center">
<Text className="text-content-title text-lg">
{t("connect_your_wallet")}
</Text>
</div>
{isAutoConnecting && (
<div className="text-center mb-4">
<Text className="text-content-body-default">
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import { useAccount } from "@starknet-react/core";
import { useSession } from "next-auth/react";
import { useEffect, useState } from "react";
import { toast } from "react-hot-toast";
import { useTranslation } from "react-i18next";
import WalletConnectFlow from "./WalletConnectFlow";

Expand All @@ -24,11 +23,10 @@ export default function WalletConnectionCheck({
// and we're not in a loading state
if (status === "authenticated" && session && !address) {
setShowConnectPrompt(true);
toast.error(t("please_connect_wallet"));
} else {
setShowConnectPrompt(false);
}
}, [session, address, status, t]);
}, [session, address, status]);

// Don't show prompt during loading/transitioning states
if (status === "loading") {
Expand All @@ -42,9 +40,6 @@ export default function WalletConnectionCheck({
<h2 className="text-xl font-bold text-center mb-4">
{t("connect_wallet")}
</h2>
<p className="text-gray-600 text-center mb-6">
{t("connect_wallet_description")}
</p>
<WalletConnectFlow />
</div>
</div>
Expand Down

0 comments on commit 6733202

Please sign in to comment.