Skip to content

Commit b0970fe

Browse files
committed
feat(wallet): add Stellar Wallets Kit integration and fix manual address connection
- Add Stellar Wallets Kit for multi-wallet support (Freighter, Albedo, Rabet, Lobstr) - Add new Multi-Wallet button to wallet sidebar using Stellar Wallets Kit modal - Fix manual address connection functionality with dedicated connectManualAddress function - Add robust fallback mechanisms: Stellar Wallets Kit → Direct Freighter API → Manual Address - Update wallet interfaces and context to support new connection methods - Add NetworkIndicator component for network status display - Improve error handling and user feedback for all connection methods - Ensure all wallet connection methods work seamlessly together
1 parent b203960 commit b0970fe

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+2788
-1806
lines changed

.eslintrc.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,27 @@ module.exports = {
2323
plugins: ['react', '@typescript-eslint', 'prettier'],
2424
rules: {
2525
// Prettier
26-
'prettier/prettier': 'error',
26+
'prettier/prettier': 'warn',
2727

2828
// React
2929
'react/react-in-jsx-scope': 'off', // Not needed in Next.js
3030
'react/prop-types': 'off', // We use TypeScript
31+
'react/no-unescaped-entities': 'off',
32+
'react/no-unknown-property': 'off',
3133

3234
// TypeScript
33-
'@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }],
35+
'@typescript-eslint/no-unused-vars': 'warn',
3436
'@typescript-eslint/no-explicit-any': 'warn',
37+
'no-undef': 'off', // TypeScript handles this
38+
'no-unused-vars': 'off', // TypeScript ESLint handles this
3539

3640
// General
3741
'no-console': 'warn',
3842
'no-debugger': 'error',
3943
'no-var': 'error',
4044
'prefer-const': 'error',
4145
semi: ['error', 'always'],
42-
quotes: ['error', 'single', { avoidEscape: true }],
46+
quotes: 'off', // Let prettier handle this
4347
},
4448
settings: {
4549
react: {

.github/workflows/ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,4 +144,3 @@ jobs:
144144
name: cypress-videos
145145
path: cypress/videos/
146146
retention-days: 7
147-

.github/workflows/simple-ci.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,4 +45,3 @@ jobs:
4545
name: build-files
4646
path: .next/
4747
retention-days: 7
48-

.prettierrc

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,3 @@
3030
}
3131
]
3232
}
33-

COMMANDS.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -170,12 +170,10 @@ npm run clean # Clean up cache
170170
---
171171

172172
**💡 Pro Tips:**
173+
173174
- Use `npm run dev:clean` if you encounter strange build issues
174175
- Use `npm run health:full` to verify everything is working
175176
- Use `npm run test:demo:open` to manually test your changes
176177
- Use `npm run check:fix` before committing to automatically fix issues
177178

178179
**🚀 Happy coding!**
179-
180-
181-

DEVELOPER_GUIDE.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# 🚀 Developer Guide - Nexus Experience
22

3-
> **Complete onboarding guide for developers joining the Nexus Experience project**
3+
> **Complete onboarding guide for developers joining the Nexus Experience
4+
> project**
45
56
## 📋 **Quick Start**
67

@@ -22,6 +23,7 @@ npm run setup:dev
2223
```
2324

2425
This will:
26+
2527
- Install dependencies
2628
- Create environment file from template
2729
- Fix code formatting
@@ -243,6 +245,7 @@ npm run env:check
243245
```
244246

245247
This will show:
248+
246249
- ✅ Environment loaded successfully
247250
- 📊 Number of public variables
248251
- 🔐 Number of server variables
@@ -278,17 +281,20 @@ NEXT_PUBLIC_APP_VERSION=0.1.0
278281
## 🧪 **Testing Strategy**
279282

280283
### **Unit Tests**
284+
281285
- **Location**: `__tests__/` directory
282286
- **Command**: `npm run test:unit`
283287
- **Watch mode**: `npm run test:unit:watch`
284288
- **Coverage**: `npm run test:coverage`
285289

286290
### **Component Tests**
291+
287292
- **Location**: `components/**/*.test.tsx`
288293
- **Command**: `npm run test:components`
289294
- **Watch mode**: `npm run test:components:watch`
290295

291296
### **E2E Tests**
297+
292298
- **Location**: `cypress/e2e/`
293299
- **Command**: `npm run test:e2e`
294300
- **UI**: `npm run test:e2e:open`
@@ -327,6 +333,7 @@ const easing = DESIGN_TOKENS.animations.easing['ease-out'];
327333
### **Common Issues**
328334

329335
#### **Environment Problems**
336+
330337
```bash
331338
# Check environment status
332339
npm run env:check
@@ -339,6 +346,7 @@ npm run env:validate
339346
```
340347

341348
#### **Build Issues**
349+
342350
```bash
343351
# Clean build
344352
npm run build:clean
@@ -348,6 +356,7 @@ npm run dev:reset
348356
```
349357

350358
#### **Test Failures**
359+
351360
```bash
352361
# Run tests in isolation
353362
npm run test:unit -- --testNamePattern="test name"
@@ -357,6 +366,7 @@ npm run test:coverage:open
357366
```
358367

359368
#### **Development Server Issues**
369+
360370
```bash
361371
# Clean start
362372
npm run dev:clean

DOCUMENTATION_CLEANUP_SUMMARY.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,4 +151,3 @@ and Web3 projects!** 🎉
151151
_This cleanup ensures that new developers can quickly understand and contribute
152152
to the Nexus Experience project while maintaining a professional, attractive
153153
presentation for the Web3 community._
154-

TESTING_GUIDE.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -371,4 +371,3 @@ npx lint-staged
371371
- Pair programming for complex test scenarios
372372
- Regular test maintenance sessions
373373
- Share testing knowledge and best practices
374-

app/demos/page.tsx

Lines changed: 35 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ import { NexusPrime } from '@/components/layout/NexusPrime';
88
import { EscrowProvider } from '@/contexts/EscrowContext';
99
import { WalletProvider } from '@/contexts/WalletContext';
1010
import { AuthProvider } from '@/contexts/AuthContext';
11+
import { NetworkProvider } from '@/contexts/NetworkContext';
1112
import { Providers } from '@/components/Providers';
1213
import { TransactionProvider } from '@/contexts/TransactionContext';
1314
import { ToastProvider } from '@/contexts/ToastContext';
@@ -348,8 +349,8 @@ const DemoSelector = ({
348349
}}
349350
disabled={!isConnected}
350351
className={`relative px-8 py-4 font-bold rounded-xl transition-all duration-500 transform shadow-2xl border-2 text-lg ${
351-
isConnected
352-
? 'hover:scale-110 hover:rotate-1 hover:shadow-brand-500/50 bg-gradient-to-r from-brand-500 via-accent-500 to-brand-400 hover:from-brand-600 hover:via-accent-600 hover:to-brand-500 text-white border-white/30 hover:border-white/60'
352+
isConnected
353+
? 'hover:scale-110 hover:rotate-1 hover:shadow-brand-500/50 bg-gradient-to-r from-brand-500 via-accent-500 to-brand-400 hover:from-brand-600 hover:via-accent-600 hover:to-brand-500 text-white border-white/30 hover:border-white/60'
353354
: 'bg-gradient-to-r from-gray-600 via-gray-700 to-gray-600 text-gray-400 border-gray-600 cursor-not-allowed blur-sm opacity-60'
354355
}`}
355356
>
@@ -420,7 +421,7 @@ function DemosPageContent() {
420421
const [loadingProgress, setLoadingProgress] = useState(0);
421422
const [showImmersiveDemo, setShowImmersiveDemo] = useState(false);
422423
const [showTechTree, setShowTechTree] = useState(false);
423-
424+
424425
// Authentication modals
425426
const [showAuthModal, setShowAuthModal] = useState(false);
426427
const [authModalMode, setAuthModalMode] = useState<'signup' | 'signin'>('signup');
@@ -504,10 +505,7 @@ function DemosPageContent() {
504505
<Header />
505506

506507
{/* Authentication Banner */}
507-
<AuthBanner
508-
onSignUpClick={handleSignUpClick}
509-
onSignInClick={handleSignInClick}
510-
/>
508+
<AuthBanner onSignUpClick={handleSignUpClick} onSignInClick={handleSignInClick} />
511509

512510
{/* Animated background elements */}
513511
<div className='absolute inset-0 opacity-20 bg-gradient-to-r from-brand-500/10 via-transparent to-accent-500/10'></div>
@@ -683,8 +681,7 @@ function DemosPageContent() {
683681
<br />
684682

685683
<p className='text-xl text-white/80 max-w-3xl mx-auto mb-6'>
686-
Master the art of trustless work with our demo suite on Stellar
687-
blockchain
684+
Master the art of trustless work with our demo suite on Stellar blockchain
688685
</p>
689686

690687
{/* Tutorial Buttons */}
@@ -710,15 +707,20 @@ function DemosPageContent() {
710707
onClick={() => isConnected && setShowTechTree(true)}
711708
disabled={!isConnected}
712709
className={`px-8 py-4 font-bold rounded-xl transition-all duration-300 flex items-center space-x-3 ${
713-
isConnected
714-
? 'bg-gradient-to-r from-brand-500/20 to-accent-500/20 hover:from-brand-800/50 hover:to-accent-800/50 text-white transform hover:scale-105 shadow-lg hover:shadow-xl border-2 border-white/20 hover:border-white/40'
710+
isConnected
711+
? 'bg-gradient-to-r from-brand-500/20 to-accent-500/20 hover:from-brand-800/50 hover:to-accent-800/50 text-white transform hover:scale-105 shadow-lg hover:shadow-xl border-2 border-white/20 hover:border-white/40'
715712
: 'bg-gradient-to-r from-gray-600/20 to-gray-700/20 text-gray-400 border-gray-600/30 cursor-not-allowed blur-[0.5px] opacity-70'
716713
}`}
717714
title={!isConnected ? 'Connect wallet to explore the tech tree' : ''}
718715
>
719716
<span>Trustless Work Tech Tree</span>
720717
<span className='text-xl'>
721-
<Image src='/images/icons/demos.png' alt='Trustless Work Tech Tree' width={50} height={20} />
718+
<Image
719+
src='/images/icons/demos.png'
720+
alt='Trustless Work Tech Tree'
721+
width={50}
722+
height={20}
723+
/>
722724
</span>
723725
{!isConnected && (
724726
<span className='absolute -top-1 -right-1 text-xs bg-gray-600 text-gray-300 px-1 rounded-full'>
@@ -729,17 +731,22 @@ function DemosPageContent() {
729731

730732
<a
731733
href={isConnected ? '/mini-games' : '#'}
732-
onClick={(e) => !isConnected && e.preventDefault()}
734+
onClick={e => !isConnected && e.preventDefault()}
733735
className={`px-8 py-4 font-bold rounded-xl transition-all duration-300 flex items-center space-x-3 relative ${
734-
isConnected
735-
? 'bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white transform hover:scale-105 shadow-lg hover:shadow-xl border-2 border-white/20 hover:border-white/40'
736+
isConnected
737+
? 'bg-gradient-to-r from-purple-500 to-pink-500 hover:from-purple-600 hover:to-pink-600 text-white transform hover:scale-105 shadow-lg hover:shadow-xl border-2 border-white/20 hover:border-white/40'
736738
: 'bg-gradient-to-r from-gray-600/20 to-gray-700/20 text-gray-400 border-gray-600/30 cursor-not-allowed blur-[0.5px] opacity-70'
737739
}`}
738740
title={!isConnected ? 'Connect wallet to access the Web3 playground' : ''}
739741
>
740742
<span>Nexus Web3 Playground</span>
741743
<span className='text-xl'>
742-
<Image src='/images/icons/console.png' alt='Nexus Web3 Playground' width={50} height={20} />
744+
<Image
745+
src='/images/icons/console.png'
746+
alt='Nexus Web3 Playground'
747+
width={50}
748+
height={20}
749+
/>
743750
</span>
744751
{!isConnected && (
745752
<span className='absolute -top-1 -right-1 text-xs bg-gray-600 text-gray-300 px-1 rounded-full'>
@@ -1259,32 +1266,31 @@ function DemosPageContent() {
12591266
<TechTreeModal isOpen={showTechTree} onClose={() => setShowTechTree(false)} />
12601267

12611268
{/* Authentication Modal */}
1262-
<AuthModal
1269+
<AuthModal
12631270
isOpen={showAuthModal}
12641271
onClose={() => setShowAuthModal(false)}
12651272
mode={authModalMode}
12661273
/>
12671274

12681275
{/* User Profile Modal */}
1269-
<UserProfile
1270-
isOpen={showUserProfile}
1271-
onClose={() => setShowUserProfile(false)}
1272-
/>
1276+
<UserProfile isOpen={showUserProfile} onClose={() => setShowUserProfile(false)} />
12731277
</EscrowProvider>
12741278
);
12751279
}
12761280

12771281
export default function DemosPage() {
12781282
return (
12791283
<WalletProvider>
1280-
<AuthProvider>
1281-
<ToastProvider>
1282-
<TransactionProvider>
1283-
<DemosPageContent />
1284-
<ToastContainer />
1285-
</TransactionProvider>
1286-
</ToastProvider>
1287-
</AuthProvider>
1284+
<NetworkProvider>
1285+
<AuthProvider>
1286+
<ToastProvider>
1287+
<TransactionProvider>
1288+
<DemosPageContent />
1289+
<ToastContainer />
1290+
</TransactionProvider>
1291+
</ToastProvider>
1292+
</AuthProvider>
1293+
</NetworkProvider>
12881294
</WalletProvider>
12891295
);
12901296
}

0 commit comments

Comments
 (0)