diff --git a/src/components/pages/game/game.tsx b/src/components/pages/game/game.tsx
index b512f61..24bf484 100644
--- a/src/components/pages/game/game.tsx
+++ b/src/components/pages/game/game.tsx
@@ -77,7 +77,11 @@ export const GameSection = () => {
const pendingFund = useRef(false);
const privyWallet = walletsReady
- ? (wallets.find((w) => 'isPrivyWallet' in w.standardWallet && (w.standardWallet as { isPrivyWallet: boolean }).isPrivyWallet) ?? null)
+ ? (wallets.find(
+ (w) =>
+ 'isPrivyWallet' in w.standardWallet &&
+ (w.standardWallet as { isPrivyWallet: boolean }).isPrivyWallet,
+ ) ?? null)
: null;
const isMd = useBreakpoint('md');
@@ -232,7 +236,12 @@ export const GameSection = () => {
setRetry(false);
const trimmedQuestion = data.question.trim();
const amount = paymentPrices?.[currencyName] ?? currencies[currencyName].defaultPrice;
- const result = await privyTransfer({ question: trimmedQuestion, tokenName: currencyName, amount, onStep: setLoadingStep });
+ const result = await privyTransfer({
+ question: trimmedQuestion,
+ tokenName: currencyName,
+ amount,
+ onStep: setLoadingStep,
+ });
if (!result) return;
setDisplayedTarots(result.tarots);
predictionResponseTimer.current = setTimeout(() => {
@@ -301,8 +310,12 @@ export const GameSection = () => {
setLoadingStep('shuffling');
stepTimers.current.push(
- setTimeout(() => { setLoadingStep('drawing'); }, 1600),
- setTimeout(() => { setLoadingStep('consulting'); }, 3200),
+ setTimeout(() => {
+ setLoadingStep('drawing');
+ }, 1600),
+ setTimeout(() => {
+ setLoadingStep('consulting');
+ }, 3200),
);
demoTimer.current = setTimeout(() => {
@@ -371,7 +384,7 @@ export const GameSection = () => {
useEffect(() => {
if (!authenticated || !walletsReady || privyWallet) return;
- createWallet().catch(() => {});
+ createWallet().catch((_e: unknown) => {});
}, [authenticated, walletsReady, privyWallet, createWallet]);
useEffect(() => {
@@ -379,7 +392,10 @@ export const GameSection = () => {
const target = privyWallet?.address ?? publicKey?.toBase58();
if (!target) return;
pendingFund.current = false;
- fundWallet({ address: target, options: { defaultFundingMethod: 'card', card: { preferredProvider: 'moonpay' } } }).catch((error: unknown) => {
+ fundWallet({
+ address: target,
+ options: { defaultFundingMethod: 'card', card: { preferredProvider: 'moonpay' } },
+ }).catch((error: unknown) => {
console.error('Fund wallet error:', error);
toast.error('Could not open top-up modal. Please try again.');
});
@@ -397,7 +413,10 @@ export const GameSection = () => {
return;
}
try {
- await fundWallet({ address: target, options: { defaultFundingMethod: 'card', card: { preferredProvider: 'moonpay' } } });
+ await fundWallet({
+ address: target,
+ options: { defaultFundingMethod: 'card', card: { preferredProvider: 'moonpay' } },
+ });
} catch (error: unknown) {
console.error('Fund wallet error:', error);
toast.error('Could not open top-up modal. Please try again.');
@@ -417,10 +436,7 @@ export const GameSection = () => {
{activeTarots.map((e, idx) => (
{
{loadingStep && (
-
+
{STEP_MESSAGES[loadingStep]}
)} @@ -526,7 +545,12 @@ export const GameSection = () => { variant="outline" onClick={ isRetry - ? () => { setDontReload(true); setTimeout(() => { window.location.reload(); }, 10); } + ? () => { + setDontReload(true); + setTimeout(() => { + window.location.reload(); + }, 10); + } : handleSubmit(onSubmit) } disabled={isPending || isPrivyPending || isDemoPending || status?.isShutDown || !paymentPrices} diff --git a/src/hooks/contracts/write/use-privy-send.ts b/src/hooks/contracts/write/use-privy-send.ts index 421881c..a98fc69 100644 --- a/src/hooks/contracts/write/use-privy-send.ts +++ b/src/hooks/contracts/write/use-privy-send.ts @@ -53,7 +53,7 @@ const usePrivySend = () => { options: { skipPreflight: true, commitment: 'finalized' }, }); - return bs58.default.encode(signature); + return bs58.encode(signature); } const { address: mint, decimals } = currencies[tokenName]; @@ -108,7 +108,7 @@ const usePrivySend = () => { options: { skipPreflight: true, commitment: 'finalized' }, }); - return bs58.default.encode(signature); + return bs58.encode(signature); }, onError(error) { diff --git a/src/providers/solana-provider.tsx b/src/providers/solana-provider.tsx index 104e0d4..8821290 100644 --- a/src/providers/solana-provider.tsx +++ b/src/providers/solana-provider.tsx @@ -11,6 +11,7 @@ export const SolanaProvider = ({ children }: PropsWithChildren) => {