@n1xyz/wallet-widget 0.0.5 → 0.0.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/dist/Logic/sessionManager.d.ts +1 -1
  2. package/dist/Logic/sessionManager.js +9 -5
  3. package/dist/Logic/transactionManager.js +7 -3
  4. package/dist/Logic/utils.js +9 -12
  5. package/dist/Modal/N1WalletModal.js +2 -3
  6. package/dist/Modal/NTSFlow/NTSFlow.js +7 -3
  7. package/dist/Modal/NTSFlow/components/BackButton.js +0 -1
  8. package/dist/Modal/NTSFlow/views/CreateSessionView.js +1 -1
  9. package/dist/Modal/NordFlow/NordFlow.js +26 -21
  10. package/dist/Modal/NordFlow/components/ChainButton.d.ts +1 -1
  11. package/dist/Modal/NordFlow/components/ChainButton.js +8 -8
  12. package/dist/Modal/NordFlow/components/EVMChainsButton.d.ts +8 -0
  13. package/dist/Modal/NordFlow/components/EVMChainsButton.js +18 -0
  14. package/dist/Modal/NordFlow/components/MoreButton.d.ts +8 -0
  15. package/dist/Modal/NordFlow/components/MoreButton.js +18 -0
  16. package/dist/Modal/NordFlow/components/TransactionTable.d.ts +1 -1
  17. package/dist/Modal/NordFlow/components/TransactionTable.js +8 -6
  18. package/dist/Modal/NordFlow/constants.js +4 -4
  19. package/dist/Modal/NordFlow/hooks/useDepositFlow.js +31 -16
  20. package/dist/Modal/NordFlow/hooks/useFlowState.js +5 -4
  21. package/dist/Modal/NordFlow/hooks/useNordInstance.js +17 -8
  22. package/dist/Modal/NordFlow/hooks/useNordWalletConnect.js +28 -20
  23. package/dist/Modal/NordFlow/screens/02-EvmWalletAuthScreen.js +1 -1
  24. package/dist/Modal/NordFlow/screens/03-ChainSelectionScreen.js +39 -23
  25. package/dist/Modal/NordFlow/screens/04-AmountInputScreen.d.ts +3 -1
  26. package/dist/Modal/NordFlow/screens/04-AmountInputScreen.js +37 -16
  27. package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.d.ts +1 -1
  28. package/dist/Modal/NordFlow/screens/05-DepositProgressScreen.js +3 -2
  29. package/dist/Modal/NordFlow/screens/06-DepositSuccessScreen.js +3 -1
  30. package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.d.ts +1 -1
  31. package/dist/Modal/NordFlow/screens/07-AuthLoadingScreen.js +19 -10
  32. package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.d.ts +1 -1
  33. package/dist/Modal/NordFlow/screens/08-FinalSuccessScreen.js +3 -3
  34. package/dist/Modal/NordFlow/screens/09-ErrorScreen.d.ts +1 -1
  35. package/dist/Modal/NordFlow/screens/09-ErrorScreen.js +11 -6
  36. package/dist/Modal/NordFlow/types.d.ts +3 -1
  37. package/dist/Modal/NordFlow/utils/imageUtils.js +3 -3
  38. package/dist/Modal/NordFlow/utils/nordUtils.js +3 -1
  39. package/dist/Modal/Sidebar/N1Sidebar.js +11 -5
  40. package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketOverview.d.ts +1 -1
  41. package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.d.ts +1 -1
  42. package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketSelector.js +7 -3
  43. package/dist/Modal/Sidebar/NordTradingView/MarketOverview/MarketStats.d.ts +1 -1
  44. package/dist/Modal/Sidebar/NordTradingView/NordTradingView.js +7 -7
  45. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBook.js +27 -16
  46. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookDepthVisualizer.d.ts +1 -1
  47. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.d.ts +1 -1
  48. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookHeader.js +3 -2
  49. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.d.ts +1 -1
  50. package/dist/Modal/Sidebar/NordTradingView/OrderBook/OrderBookTable.js +2 -3
  51. package/dist/Modal/Sidebar/NordTradingView/TradeForm/AmountInput.d.ts +1 -1
  52. package/dist/Modal/Sidebar/NordTradingView/TradeForm/BuySellTabs.js +2 -2
  53. package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.d.ts +1 -1
  54. package/dist/Modal/Sidebar/NordTradingView/TradeForm/FillModeSelector.js +16 -13
  55. package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.d.ts +1 -1
  56. package/dist/Modal/Sidebar/NordTradingView/TradeForm/OrderTypeSelector.js +17 -11
  57. package/dist/Modal/Sidebar/NordTradingView/TradeForm/PriceInput.d.ts +1 -1
  58. package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.d.ts +1 -1
  59. package/dist/Modal/Sidebar/NordTradingView/TradeForm/SubmitButton.js +2 -2
  60. package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.d.ts +1 -1
  61. package/dist/Modal/Sidebar/NordTradingView/TradeForm/TotalCalculator.js +3 -1
  62. package/dist/Modal/Sidebar/NordTradingView/TradeForm/TradeForm.js +21 -11
  63. package/dist/Modal/Sidebar/NordTradingView/UserBalances/UserBalances.js +1 -1
  64. package/dist/Modal/Sidebar/NordTradingView/UserOrders/UserOrders.js +11 -6
  65. package/dist/Modal/Sidebar/NordTradingView/UserPositions/UserPositions.js +14 -7
  66. package/dist/Provider/LazyWalletProvider.js +10 -4
  67. package/dist/Provider/N1WalletProvider.js +6 -5
  68. package/dist/components/logos/ArbitrumLogo.d.ts +8 -0
  69. package/dist/components/logos/ArbitrumLogo.js +5 -0
  70. package/dist/components/logos/BaseLogo.d.ts +8 -0
  71. package/dist/components/logos/BaseLogo.js +5 -0
  72. package/dist/components/logos/BeraLogo.d.ts +8 -0
  73. package/dist/components/logos/BeraLogo.js +5 -0
  74. package/dist/components/logos/BitcoinLogo.d.ts +8 -0
  75. package/dist/components/logos/BitcoinLogo.js +5 -0
  76. package/dist/components/logos/EVMChainsGroup.d.ts +7 -0
  77. package/dist/components/logos/EVMChainsGroup.js +18 -0
  78. package/dist/components/logos/EthereumLogo.d.ts +8 -0
  79. package/dist/components/logos/EthereumLogo.js +5 -0
  80. package/dist/components/logos/HyperliquidLogo.d.ts +8 -0
  81. package/dist/components/logos/HyperliquidLogo.js +5 -0
  82. package/dist/components/logos/MoreChainsGroup.d.ts +7 -0
  83. package/dist/components/logos/MoreChainsGroup.js +18 -0
  84. package/dist/components/logos/OptimismLogo.d.ts +8 -0
  85. package/dist/components/logos/OptimismLogo.js +5 -0
  86. package/dist/components/logos/SolanaLogo.d.ts +8 -0
  87. package/dist/components/logos/SolanaLogo.js +5 -0
  88. package/dist/components/logos/index.d.ts +10 -0
  89. package/dist/components/logos/index.js +10 -0
  90. package/dist/main.css +1 -1
  91. package/package.json +1 -1
@@ -13,6 +13,7 @@ import { useCallback, useEffect, useState } from 'react';
13
13
  import { FlowState, initialFlowContext } from '../types';
14
14
  import { STATE_TRANSITIONS } from '../constants';
15
15
  import { clearStoredState, loadStateFromLocalStorage, saveStateToLocalStorage, } from '../utils/persistence';
16
+ import { logger } from '../../../utils/logger';
16
17
  /**
17
18
  * Custom hook for managing the wallet connection flow state machine
18
19
  * @param options Configuration options
@@ -49,7 +50,7 @@ export var useFlowState = function (options) {
49
50
  var transition = useCallback(function (targetState, contextUpdates) {
50
51
  if (contextUpdates === void 0) { contextUpdates = {}; }
51
52
  if (!canTransition(targetState, __assign(__assign({}, context), contextUpdates))) {
52
- console.warn("Transition from ".concat(state, " to ").concat(targetState, " is not allowed"));
53
+ logger.warn("Transition from ".concat(state, " to ").concat(targetState, " is not allowed"));
53
54
  return false;
54
55
  }
55
56
  setIsTransitioning(true);
@@ -62,7 +63,7 @@ export var useFlowState = function (options) {
62
63
  });
63
64
  // Then update state
64
65
  setPrevState(state);
65
- console.log(targetState, "targetState");
66
+ logger.debug(targetState, 'targetState');
66
67
  setState(targetState);
67
68
  if (onStateChange) {
68
69
  onStateChange(targetState, state);
@@ -77,7 +78,7 @@ export var useFlowState = function (options) {
77
78
  clearStoredState();
78
79
  setContext(initialFlowContext);
79
80
  setPrevState(null);
80
- console.log("resetting");
81
+ logger.debug('resetting');
81
82
  setState(FlowState.IDLE);
82
83
  if (onStateChange) {
83
84
  onStateChange(FlowState.IDLE, state);
@@ -103,7 +104,7 @@ export var useFlowState = function (options) {
103
104
  }
104
105
  setContext(savedState.context);
105
106
  setPrevState(state);
106
- console.log(savedState.state, "savedState.state");
107
+ logger.debug(savedState.state, 'savedState.state');
107
108
  setState(savedState.state);
108
109
  if (onStateChange) {
109
110
  onStateChange(savedState.state, state);
@@ -39,8 +39,8 @@ import { generateSessionKeyPair, signEd25519 } from '@n1xyz/nts-sdk';
39
39
  import { PublicKey } from '@solana/web3.js';
40
40
  import { useEffect } from 'react';
41
41
  import { WalletError, WalletErrorCode } from '../../../errors/types';
42
- import { getSessionKeysFromLocalStorage, storeSessionKeysInLocalStorage } from '../../../Logic/utils';
43
- import { useN1WalletContext, useN1WalletInternalContext } from '../../../Provider/hooks';
42
+ import { getSessionKeysFromLocalStorage, storeSessionKeysInLocalStorage, } from '../../../Logic/utils';
43
+ import { useN1WalletContext, useN1WalletInternalContext, } from '../../../Provider/hooks';
44
44
  import { logger } from '../../../utils/logger';
45
45
  // Utility function to convert Uint8Array to base64 string
46
46
  function arrayBufferToBase64(buffer) {
@@ -138,7 +138,7 @@ export var useNordInstance = function () {
138
138
  sessionKeyPair_1 = {
139
139
  privateKey: storedKeys.ed25519PrivateKey,
140
140
  // For Ed25519, the public key is the second half of the private key
141
- publicKey: tempKeyPair.publicKey
141
+ publicKey: tempKeyPair.publicKey,
142
142
  };
143
143
  return [3 /*break*/, 4];
144
144
  case 3:
@@ -232,7 +232,9 @@ export var useNordInstance = function () {
232
232
  if (storedSessionId !== null) {
233
233
  // Convert the stored sessionId to BigInt
234
234
  sessionId = BigInt(storedSessionId);
235
- logger.debug('Found existing sessionId in localStorage', { sessionId: storedSessionId });
235
+ logger.debug('Found existing sessionId in localStorage', {
236
+ sessionId: storedSessionId,
237
+ });
236
238
  }
237
239
  }
238
240
  }
@@ -248,7 +250,7 @@ export var useNordInstance = function () {
248
250
  transactionSignFn: signTransactionWithWalletKey,
249
251
  sessionId: sessionId, // Pass the sessionId if it exists
250
252
  sessionPubKey: sessionPubKey,
251
- publicKey: new PublicKey(address)
253
+ publicKey: new PublicKey(address),
252
254
  });
253
255
  _a.label = 3;
254
256
  case 3:
@@ -289,7 +291,10 @@ export var useNordInstance = function () {
289
291
  return __generator(this, function (_a) {
290
292
  switch (_a.label) {
291
293
  case 0:
292
- if (!(signMessageWithWalletKey && signMessageWithSessionKey && signTransactionWithWalletKey && nordUser == null)) return [3 /*break*/, 2];
294
+ if (!(signMessageWithWalletKey &&
295
+ signMessageWithSessionKey &&
296
+ signTransactionWithWalletKey &&
297
+ nordUser == null)) return [3 /*break*/, 2];
293
298
  logger.debug('Dependencies available, initializing NordUser');
294
299
  return [4 /*yield*/, createNordUser()];
295
300
  case 1:
@@ -300,11 +305,15 @@ export var useNordInstance = function () {
300
305
  });
301
306
  }); };
302
307
  initNordUser();
303
- }, [signMessageWithWalletKey, signMessageWithSessionKey, signTransactionWithWalletKey]);
308
+ }, [
309
+ signMessageWithWalletKey,
310
+ signMessageWithSessionKey,
311
+ signTransactionWithWalletKey,
312
+ ]);
304
313
  return {
305
314
  nord: nord,
306
315
  createNordUser: createNordUser,
307
316
  nordUser: nordUser,
308
- createTransactionSignFunction: createTransactionSignFunction
317
+ createTransactionSignFunction: createTransactionSignFunction,
309
318
  };
310
319
  };
@@ -35,8 +35,9 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
35
35
  }
36
36
  };
37
37
  import { useCallback, useEffect, useState, useRef } from 'react';
38
- import { useN1WalletContext, useN1WalletInternalContext } from '../../../Provider/hooks';
38
+ import { useN1WalletContext, useN1WalletInternalContext, } from '../../../Provider/hooks';
39
39
  import { N1SessionMode } from '../../../Provider/types';
40
+ import { logger } from '../../../utils/logger';
40
41
  import { FlowState } from '../types';
41
42
  /**
42
43
  * Hook for handling wallet connection
@@ -81,7 +82,7 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
81
82
  return [2 /*return*/];
82
83
  setIsConnecting(true);
83
84
  setHasProcessedWallet(false);
84
- console.log('Starting wallet connection process');
85
+ logger.debug('Starting wallet connection process');
85
86
  _a.label = 1;
86
87
  case 1:
87
88
  _a.trys.push([1, 3, , 4]);
@@ -90,13 +91,13 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
90
91
  case 2:
91
92
  // Show Dynamic widget to connect wallet
92
93
  _a.sent();
93
- console.log('Dynamic widget shown');
94
+ logger.debug('Dynamic widget shown');
94
95
  return [3 /*break*/, 4];
95
96
  case 3:
96
97
  error_1 = _a.sent();
97
98
  setIsConnecting(false);
98
99
  updateContext({ walletType: null });
99
- console.error('Error showing Dynamic widget:', error_1);
100
+ logger.error('Error showing Dynamic widget:', error_1);
100
101
  return [3 /*break*/, 4];
101
102
  case 4: return [2 /*return*/];
102
103
  }
@@ -106,7 +107,7 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
106
107
  * Disconnect wallet
107
108
  */
108
109
  var disconnectWallet = useCallback(function () {
109
- console.log('Disconnecting wallet');
110
+ logger.debug('Disconnecting wallet');
110
111
  setWalletType(null);
111
112
  setHasProcessedWallet(false);
112
113
  updateContext({ walletType: null });
@@ -123,32 +124,36 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
123
124
  sessionId = nordUser.sessionId;
124
125
  hasActiveSession = sessionId != null;
125
126
  updateContext({ hasNordAccount: hasNordAccount, hasActiveSession: hasActiveSession });
126
- transitionDestination = hasNordAccount ? (sessionId != null ? FlowState.FINAL_SUCCESS : FlowState.AUTH_LOADING) : FlowState.CHAIN_SELECTION;
127
+ transitionDestination = hasNordAccount
128
+ ? sessionId != null
129
+ ? FlowState.FINAL_SUCCESS
130
+ : FlowState.AUTH_LOADING
131
+ : FlowState.CHAIN_SELECTION;
127
132
  if (hasNordAccount && sessionId != null) {
128
133
  setIsConnected(true);
129
134
  }
130
135
  // Force a small delay to ensure UI updates properly
131
136
  setTimeout(function () {
132
137
  try {
133
- console.log('Attempting transition to ' + transitionDestination);
138
+ logger.debug('Attempting transition to ' + transitionDestination);
134
139
  transition(transitionDestination, {
135
140
  walletType: 'solana',
136
141
  hasNordAccount: hasNordAccount,
137
- hasActiveSession: hasActiveSession
142
+ hasActiveSession: hasActiveSession,
138
143
  });
139
- console.log('Transition to ' + transitionDestination + ' completed');
144
+ logger.debug('Transition to ' + transitionDestination + ' completed');
140
145
  // Try again with a longer delay as a fallback
141
146
  setTimeout(function () {
142
- console.log('Trying fallback transition after delay');
147
+ logger.debug('Trying fallback transition after delay');
143
148
  transition(transitionDestination, {
144
149
  walletType: 'solana',
145
150
  hasNordAccount: hasNordAccount,
146
- hasActiveSession: hasActiveSession
151
+ hasActiveSession: hasActiveSession,
147
152
  });
148
153
  }, 500);
149
154
  }
150
155
  catch (error) {
151
- console.error('Error during transition:', error);
156
+ logger.error('Error during transition:', error);
152
157
  }
153
158
  finally {
154
159
  setIsConnecting(false);
@@ -170,8 +175,9 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
170
175
  return;
171
176
  }
172
177
  // If we've already processed this specific wallet address, don't process again
173
- if (hasProcessedWallet && processedWalletAddressRef.current === dynamicWallet.address) {
174
- console.log('Skipping wallet processing - already processed this address');
178
+ if (hasProcessedWallet &&
179
+ processedWalletAddressRef.current === dynamicWallet.address) {
180
+ logger.debug('Skipping wallet processing - already processed this address');
175
181
  return;
176
182
  }
177
183
  // Use an IIFE to handle the async processing
@@ -181,14 +187,14 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
181
187
  return __generator(this, function (_c) {
182
188
  // Prevent processing if already in progress
183
189
  if (hasProcessedWallet) {
184
- console.log('Skipping wallet processing - hasProcessedWallet is true');
190
+ logger.debug('Skipping wallet processing - hasProcessedWallet is true');
185
191
  return [2 /*return*/];
186
192
  }
187
- console.log('Processing wallet connection:', {
193
+ logger.debug('Processing wallet connection:', {
188
194
  wallet: (_a = dynamicWallet.connector) === null || _a === void 0 ? void 0 : _a.name,
189
195
  address: (_b = dynamicWallet.address) === null || _b === void 0 ? void 0 : _b.slice(0, 8),
190
196
  state: state,
191
- isNordMode: isNordMode
197
+ isNordMode: isNordMode,
192
198
  });
193
199
  // Set processed flag first to prevent re-entry
194
200
  setHasProcessedWallet(true);
@@ -200,20 +206,22 @@ export var useNordWalletConnect = function (state, transition, context, updateCo
200
206
  }); })();
201
207
  // Cleanup function to handle component unmount
202
208
  return function () {
203
- console.log('Wallet connection effect cleanup');
209
+ logger.debug('Wallet connection effect cleanup');
204
210
  };
205
211
  }, [dynamicWallet, determineWalletType]);
206
212
  // Handle wallet disconnection in a separate effect
207
213
  useEffect(function () {
208
214
  if (!dynamicWallet && hasProcessedWallet) {
209
- console.log('Wallet disconnected, resetting processed flag');
215
+ logger.debug('Wallet disconnected, resetting processed flag');
210
216
  processedWalletAddressRef.current = null;
211
217
  setHasProcessedWallet(false);
212
218
  }
213
219
  }, [dynamicWallet, hasProcessedWallet]);
214
220
  // Handle connecting state changes in a separate effect
215
221
  useEffect(function () {
216
- if (state === FlowState.CONNECTING_WALLET && !dynamicWallet && isConnecting) {
222
+ if (state === FlowState.CONNECTING_WALLET &&
223
+ !dynamicWallet &&
224
+ isConnecting) {
217
225
  // Only keep isConnecting true if we're in the connecting state and don't have a wallet yet
218
226
  // This prevents an infinite loop of setting isConnecting
219
227
  }
@@ -15,7 +15,7 @@ export function EvmWalletAuthScreen(_a) {
15
15
  // Handle signature request
16
16
  var handleSignatureRequest = function () {
17
17
  setAuthState(AuthState.WAITING_FOR_SIGNATURE);
18
- // Simulate signature process - in a real implementation,
18
+ // Simulate signature process - in a real implementation,
19
19
  // this would be replaced with actual wallet signature logic
20
20
  setTimeout(function () {
21
21
  setAuthState(AuthState.SUCCESS);
@@ -2,46 +2,62 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
2
  import { useState } from 'react';
3
3
  import { SolanaNetwork } from '../../../config/solana';
4
4
  import { ChainButton } from '../components/ChainButton';
5
+ import { EVMChainsButton } from '../components/EVMChainsButton';
6
+ import { MoreButton } from '../components/MoreButton';
7
+ import { SolanaLogo } from '../../../components/logos';
8
+ import Logo from '../../../components/Logo';
9
+ import { logger } from '../../../utils/logger';
10
+ // Custom N1Logo wrapper that responds to the group hover state
11
+ var N1Logo = function (_a) {
12
+ var _b = _a.size, size = _b === void 0 ? 38 : _b;
13
+ return (_jsx("div", { className: "text-gray-800 dark:text-white group-hover:text-red-500 dark:group-hover:text-red-500 transition-colors duration-200", children: _jsx(Logo, { size: size }) }));
14
+ };
5
15
  export function ChainSelectionScreen(_a) {
6
16
  var onChainSelect = _a.onChainSelect;
7
17
  var _b = useState(false), isLoading = _b[0], setIsLoading = _b[1];
8
- // Only allow testnet, gray out other chains
18
+ // Only allow devnet, gray out other chains
9
19
  var handleChainSelect = function (chainId) {
10
- console.log('Chain selected in ChainSelectionScreen:', chainId);
11
- // Otherwise, only allow testnet to be selected
12
- if (chainId === 'testnet') {
20
+ logger.debug('Chain selected in ChainSelectionScreen:', chainId);
21
+ // Only allow devnet to be selected
22
+ if (chainId === 'devnet') {
13
23
  setIsLoading(true);
14
24
  onChainSelect(chainId);
15
25
  }
16
26
  else {
17
- console.log('Chain not allowed:', chainId);
27
+ logger.debug('Chain not allowed:', chainId);
18
28
  // Could show a toast or message here
19
29
  }
20
30
  };
21
- // Otherwise, use the default Solana networks
22
- // Add network information to chains
31
+ // Define the 4 options as requested
23
32
  var chainsWithNetworkInfo = [
24
33
  {
25
- id: 'mainnet',
26
- name: 'Mainnet',
27
- logo: '/images/chains/solana.svg',
34
+ id: 'devnet',
35
+ name: 'Devnet',
36
+ logo: (_jsx("div", { className: "flex items-center justify-center", style: { width: 48, height: 48 }, children: _jsx(N1Logo, {}) })),
37
+ network: SolanaNetwork.DEVNET,
38
+ disabled: false, // Only devnet is clickable
39
+ },
40
+ {
41
+ id: 'solana',
42
+ name: 'Solana',
43
+ logo: (_jsx("div", { className: "flex items-center justify-center", style: { width: 48, height: 48 }, children: _jsx(SolanaLogo, { width: 36, height: 36 }) })),
28
44
  network: SolanaNetwork.MAINNET,
29
- disabled: true
45
+ disabled: true,
30
46
  },
31
47
  {
32
- id: 'testnet',
33
- name: 'Testnet',
34
- logo: '/images/chains/solana.svg',
35
- network: SolanaNetwork.TESTNET,
36
- disabled: false
48
+ id: 'evm-chains',
49
+ name: 'EVM Chains',
50
+ logo: '', // Not needed as we're using EVMChainsButton
51
+ network: '', // Empty string instead of null
52
+ disabled: true,
37
53
  },
38
54
  {
39
- id: 'devnet',
40
- name: 'Devnet',
41
- logo: '/images/chains/solana.svg',
42
- network: SolanaNetwork.DEVNET,
43
- disabled: true
44
- }
55
+ id: 'more',
56
+ name: 'More',
57
+ logo: '', // Not needed as we're using MoreButton
58
+ network: '', // Empty string instead of null
59
+ disabled: true,
60
+ },
45
61
  ];
46
- return (_jsxs("div", { className: "overflow-hidden relative", children: [_jsx("h2", { className: "text-xl text-gray-800 dark:text-white font-semibold mb-6 text-center", children: "Select Network" }), isLoading ? (_jsx("div", { className: "flex justify-center items-center py-8", children: _jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main" }) })) : (_jsx("div", { className: "space-y-8", children: _jsx("div", { className: "grid grid-cols-2 gap-4", children: chainsWithNetworkInfo.map(function (chain) { return (_jsx(ChainButton, { chain: chain, onClick: function () { return handleChainSelect(chain.id); }, disabled: chain.disabled }, chain.id)); }) }) }))] }));
62
+ return (_jsxs("div", { className: "overflow-hidden relative", children: [_jsx("h2", { className: "text-xl text-gray-800 dark:text-white font-semibold mb-6 text-center", children: "Select Origin Network" }), isLoading ? (_jsx("div", { className: "flex justify-center items-center py-8", children: _jsx("div", { className: "animate-spin rounded-full h-8 w-8 border-b-2 border-main" }) })) : (_jsxs("div", { className: "space-y-8", children: [_jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx(ChainButton, { chain: chainsWithNetworkInfo[0], onClick: function () { return handleChainSelect(chainsWithNetworkInfo[0].id); }, disabled: chainsWithNetworkInfo[0].disabled }, chainsWithNetworkInfo[0].id), _jsx(ChainButton, { chain: chainsWithNetworkInfo[1], onClick: function () { return handleChainSelect(chainsWithNetworkInfo[1].id); }, disabled: chainsWithNetworkInfo[1].disabled }, chainsWithNetworkInfo[1].id)] }), _jsxs("div", { className: "grid grid-cols-2 gap-4", children: [_jsx(EVMChainsButton, { chain: chainsWithNetworkInfo[2], onClick: function () { return handleChainSelect(chainsWithNetworkInfo[2].id); }, disabled: chainsWithNetworkInfo[2].disabled }, chainsWithNetworkInfo[2].id), _jsx(MoreButton, { chain: chainsWithNetworkInfo[3], onClick: function () { return handleChainSelect(chainsWithNetworkInfo[3].id); }, disabled: chainsWithNetworkInfo[3].disabled }, chainsWithNetworkInfo[3].id)] })] }))] }));
47
63
  }
@@ -6,5 +6,7 @@ interface AmountInputScreenProps {
6
6
  faucetUrl?: string;
7
7
  refreshBalance?: () => Promise<void>;
8
8
  }
9
- export declare function AmountInputScreen({ amount, onAmountChange, onContinue, balance, faucetUrl: propFaucetUrl, refreshBalance, }: AmountInputScreenProps): import("react/jsx-runtime").JSX.Element;
9
+ export declare function AmountInputScreen({ amount: _amount, // Renamed to _amount since we're not using the prop
10
+ onAmountChange, onContinue, balance: _balance, // Renamed to _balance since we're overriding it
11
+ faucetUrl: propFaucetUrl, refreshBalance, }: AmountInputScreenProps): import("react/jsx-runtime").JSX.Element;
10
12
  export {};
@@ -36,13 +36,24 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
36
36
  };
37
37
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
38
38
  import { useCallback, useEffect, useRef, useState } from 'react';
39
- import { useN1WalletContext, useN1WalletInternalContext } from '../../../Provider/hooks';
39
+ import { useN1WalletContext, useN1WalletInternalContext, } from '../../../Provider/hooks';
40
40
  import { ImageWithFallback } from '../components';
41
- import { ANIMATION_EASE, MAX_DEPOSIT, MIN_DEPOSIT } from '../constants';
41
+ import { ANIMATION_EASE } from '../constants';
42
42
  import { formatAmount, isNordConfigured } from '../utils/nordUtils';
43
43
  export function AmountInputScreen(_a) {
44
44
  var _this = this;
45
- var amount = _a.amount, onAmountChange = _a.onAmountChange, onContinue = _a.onContinue, balance = _a.balance, propFaucetUrl = _a.faucetUrl, refreshBalance = _a.refreshBalance;
45
+ var _amount = _a.amount, // Renamed to _amount since we're not using the prop
46
+ onAmountChange = _a.onAmountChange, onContinue = _a.onContinue, _balance = _a.balance, // Renamed to _balance since we're overriding it
47
+ propFaucetUrl = _a.faucetUrl, refreshBalance = _a.refreshBalance;
48
+ // Hard code amount to 100
49
+ var amount = '100';
50
+ // Hard code balance to 0 to allow faucet to trigger
51
+ var balance = 0;
52
+ // Force the amount to be 100 on component mount only, not on every render
53
+ useEffect(function () {
54
+ onAmountChange('100');
55
+ // Empty dependency array ensures this only runs once on mount
56
+ }, []);
46
57
  var _b = useState(false), isHovered = _b[0], setIsHovered = _b[1];
47
58
  var _c = useState(false), isFaucetLoading = _c[0], setIsFaucetLoading = _c[1];
48
59
  var _d = useState(null), faucetError = _d[0], setFaucetError = _d[1];
@@ -74,16 +85,15 @@ export function AmountInputScreen(_a) {
74
85
  }
75
86
  }
76
87
  }, [nord]);
77
- var handleAmountChange = function (e) {
78
- var value = e.target.value;
79
- if (/^\d*\.?\d*$/.test(value)) {
80
- onAmountChange(value);
81
- }
82
- };
88
+ // Removed handleAmountChange since we don't want user to edit the amount
83
89
  // todo:fix
84
90
  var isValidAmount = true;
91
+ // Hard code MIN_DEPOSIT to 100
92
+ var hardcodedMinDeposit = 100;
93
+ // Hard code MAX_DEPOSIT to 100
94
+ var hardcodedMaxDeposit = 100;
85
95
  // Check if faucet is enabled and balance is low
86
- var shouldShowFaucet = faucetUrl && balance < MIN_DEPOSIT && !tokensObtained;
96
+ var shouldShowFaucet = faucetUrl && balance < hardcodedMinDeposit && !tokensObtained;
87
97
  // Determine if we should show the faucet overlay
88
98
  var showFaucetOverlay = (shouldShowFaucet && (isFaucetLoading || faucetError)) || showFaucetSuccess;
89
99
  // Function to request tokens from faucet
@@ -110,7 +120,9 @@ export function AmountInputScreen(_a) {
110
120
  case 2:
111
121
  response = _a.sent();
112
122
  if (!!response.ok) return [3 /*break*/, 4];
113
- return [4 /*yield*/, response.json().catch(function () { return ({ error: 'Failed to request tokens' }); })];
123
+ return [4 /*yield*/, response
124
+ .json()
125
+ .catch(function () { return ({ error: 'Failed to request tokens' }); })];
114
126
  case 3:
115
127
  errorData = _a.sent();
116
128
  throw new Error(errorData.error || 'Failed to request tokens');
@@ -143,23 +155,32 @@ export function AmountInputScreen(_a) {
143
155
  }); }, [faucetUrl, address, refreshBalance]);
144
156
  // Request tokens automatically when faucet is enabled and balance is low
145
157
  useEffect(function () {
146
- if (shouldShowFaucet && !isFaucetLoading && !faucetError && !showFaucetSuccess) {
158
+ if (shouldShowFaucet &&
159
+ !isFaucetLoading &&
160
+ !faucetError &&
161
+ !showFaucetSuccess) {
147
162
  requestTestnetTokens();
148
163
  }
149
- }, [shouldShowFaucet, isFaucetLoading, faucetError, showFaucetSuccess, requestTestnetTokens]);
164
+ }, [
165
+ shouldShowFaucet,
166
+ isFaucetLoading,
167
+ faucetError,
168
+ showFaucetSuccess,
169
+ requestTestnetTokens,
170
+ ]);
150
171
  // Reset tokensObtained state if balance changes to a higher value
151
172
  useEffect(function () {
152
173
  // If balance has increased and is now sufficient, reset the tokensObtained flag
153
- if (balance > prevBalanceRef.current && balance >= MIN_DEPOSIT) {
174
+ if (balance > prevBalanceRef.current && balance >= hardcodedMinDeposit) {
154
175
  setTokensObtained(false);
155
176
  setShowFaucetSuccess(false);
156
177
  }
157
178
  // Update the previous balance reference
158
179
  prevBalanceRef.current = balance;
159
- }, [balance]);
180
+ }, [balance, hardcodedMinDeposit]);
160
181
  // Format the balance with the appropriate number of decimal places
161
182
  var formattedBalance = formatAmount(balance, tokenDecimals);
162
- return (_jsxs("div", { className: "overflow-hidden relative", children: [showFaucetOverlay && (_jsx("div", { className: "absolute inset-0 z-10 bg-white/70 dark:bg-neutral-900/80 backdrop-blur-md flex flex-col items-center justify-center p-6", children: isFaucetLoading ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "relative w-16 h-16 mb-4", children: _jsxs("div", { className: "absolute inset-0 grid grid-cols-2 gap-1", children: [_jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader" }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.2s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.4s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.6s' } }) })] }) }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Obtaining Testnet Tokens" }), _jsx("p", { className: "text-sm text-gray-500 dark:text-neutral-400 text-center", children: "Please wait while we request testnet tokens for your wallet..." })] })) : showFaucetSuccess ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-green-500 text-4xl mb-4", children: "\u2713" }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Tokens Obtained Successfully" }), _jsx("p", { className: "text-sm text-green-500 dark:text-green-400 text-center mb-4", children: "Your wallet has been funded with testnet tokens." }), _jsx("p", { className: "text-sm text-gray-500 dark:text-neutral-400 text-center", children: "Please wait while your balance updates..." })] })) : faucetError ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-red-500 text-4xl mb-4", children: "\u26A0\uFE0F" }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Failed to Get Tokens" }), _jsx("p", { className: "text-sm text-red-500 dark:text-red-400 text-center mb-4", children: faucetError }), _jsx("button", { onClick: requestTestnetTokens, className: "px-4 py-2 bg-main text-white rounded-md hover:bg-main/90 transition-colors", children: "Try Again" })] })) : null })), _jsx("h2", { className: "text-xl text-gray-800 dark:text-white font-semibold mb-6 text-center", children: "Enter Amount" }), _jsxs("div", { className: "space-y-8", children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm text-gray-500 dark:text-neutral-400", children: "Amount" }), _jsxs("span", { className: "text-sm text-gray-500 dark:text-neutral-400", children: ["Balance: ", formattedBalance, " ", tokenSymbol] })] }), _jsxs("div", { className: "relative", children: [_jsx("input", { type: "text", defaultValue: amount, onChange: handleAmountChange, placeholder: "0.00", className: "w-full bg-white dark:bg-neutral-950 border-2 border-gray-100 dark:border-neutral-800 rounded-md px-4 py-3 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-0 focus:border-main dark:focus:border-main transition-colors duration-200" }), _jsxs("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 flex items-center gap-2", children: [_jsx(ImageWithFallback, { src: tokenLogo, width: 20, height: 20, alt: tokenSymbol, fallbackClassName: "w-5 h-5 rounded-full text-xs font-bold flex items-center justify-center", fallbackBgColor: "bg-blue-100 dark:bg-blue-900", fallbackTextColor: "text-blue-500 dark:text-blue-300", fallbackText: tokenSymbol.charAt(0) }), _jsx("span", { className: "text-gray-400 dark:text-neutral-500", children: tokenSymbol })] })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("span", { className: "text-xs text-gray-400 dark:text-neutral-500", children: ["Min: ", MIN_DEPOSIT, " ", tokenSymbol] }), _jsxs("span", { className: "text-xs text-gray-400 dark:text-neutral-500", children: ["Max: ", MAX_DEPOSIT, " ", tokenSymbol] })] })] }), _jsx("button", { onClick: onContinue, disabled: !isValidAmount, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-gray-200 dark:border-gray-800 hover:border-gray-400 dark:hover:border-white/60\n ").concat(!isValidAmount ? 'opacity-50 cursor-not-allowed hover:border-gray-200 dark:hover:border-gray-800' : '', "\n "), style: {
183
+ return (_jsxs("div", { className: "overflow-hidden relative", children: [showFaucetOverlay && (_jsx("div", { className: "absolute inset-0 z-10 bg-white/70 dark:bg-neutral-900/80 backdrop-blur-md flex flex-col items-center justify-center p-6", children: isFaucetLoading ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "relative w-16 h-16 mb-4", children: _jsxs("div", { className: "absolute inset-0 grid grid-cols-2 gap-1", children: [_jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader" }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.2s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.4s' } }) }), _jsx("div", { className: "relative bg-white dark:bg-neutral-800 border border-gray-100 dark:border-neutral-700 overflow-hidden rounded-sm", children: _jsx("div", { className: "absolute inset-x-0 bottom-0 h-full bg-main/40 dark:bg-main/30 animate-square-loader", style: { animationDelay: '0.6s' } }) })] }) }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Obtaining Testnet Tokens" }), _jsx("p", { className: "text-sm text-gray-500 dark:text-neutral-400 text-center", children: "Please wait while we request testnet tokens for your wallet..." })] })) : showFaucetSuccess ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-green-500 text-4xl mb-4", children: "\u2713" }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Tokens Obtained Successfully" }), _jsx("p", { className: "text-sm text-green-500 dark:text-green-400 text-center mb-4", children: "Your wallet has been funded with testnet tokens." }), _jsx("p", { className: "text-sm text-gray-500 dark:text-neutral-400 text-center", children: "Please wait while your balance updates..." })] })) : faucetError ? (_jsxs(_Fragment, { children: [_jsx("div", { className: "text-red-500 text-4xl mb-4", children: "\u26A0\uFE0F" }), _jsx("h3", { className: "text-lg font-medium text-gray-800 dark:text-white mb-2", children: "Failed to Get Tokens" }), _jsx("p", { className: "text-sm text-red-500 dark:text-red-400 text-center mb-4", children: faucetError }), _jsx("button", { onClick: requestTestnetTokens, className: "px-4 py-2 bg-main text-white rounded-md hover:bg-main/90 transition-colors", children: "Try Again" })] })) : null })), _jsx("h2", { className: "text-xl text-gray-800 dark:text-white font-semibold mb-6 text-center", children: "Enter Amount" }), _jsxs("div", { className: "space-y-8", children: [_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-sm text-gray-500 dark:text-neutral-400", children: "Amount" }), _jsxs("span", { className: "text-sm text-gray-500 dark:text-neutral-400", children: ["Balance: ", formattedBalance, " ", tokenSymbol] })] }), _jsxs("div", { className: "relative", children: [_jsx("input", { type: "text", value: amount, readOnly: true, className: "w-full bg-white dark:bg-neutral-950 border-2 border-gray-100 dark:border-neutral-800 rounded-md px-4 py-3 text-gray-900 dark:text-white placeholder-gray-400 dark:placeholder-neutral-500 focus:outline-none focus:ring-0 focus:border-main dark:focus:border-main transition-colors duration-200 cursor-not-allowed" }), _jsxs("div", { className: "absolute right-4 top-1/2 -translate-y-1/2 flex items-center gap-2", children: [_jsx(ImageWithFallback, { src: tokenLogo, width: 20, height: 20, alt: tokenSymbol, fallbackClassName: "w-5 h-5 rounded-full text-xs font-bold flex items-center justify-center", fallbackBgColor: "bg-blue-100 dark:bg-blue-900", fallbackTextColor: "text-blue-500 dark:text-blue-300", fallbackText: tokenSymbol.charAt(0) }), _jsx("span", { className: "text-gray-400 dark:text-neutral-500", children: tokenSymbol })] })] }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsxs("span", { className: "text-xs text-gray-400 dark:text-neutral-500", children: ["Min: ", hardcodedMinDeposit, " ", tokenSymbol] }), _jsxs("span", { className: "text-xs text-gray-400 dark:text-neutral-500", children: ["Max: ", hardcodedMaxDeposit, " ", tokenSymbol] })] })] }), _jsx("button", { onClick: onContinue, disabled: !isValidAmount, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-gray-200 dark:border-gray-800 hover:border-gray-400 dark:hover:border-white/60\n ").concat(!isValidAmount ? 'opacity-50 cursor-not-allowed hover:border-gray-200 dark:hover:border-gray-800' : '', "\n "), style: {
163
184
  transform: isHovered && isValidAmount ? 'scale(0.99)' : 'scale(1)',
164
185
  }, children: _jsx("span", { className: "\n text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-white\n "), children: "Continue" }) })] })] }));
165
186
  }
@@ -2,5 +2,5 @@ import { WaitingMessageState } from '../types';
2
2
  interface DepositProgressScreenProps {
3
3
  message: WaitingMessageState;
4
4
  }
5
- export declare function DepositProgressScreen({ message, }: DepositProgressScreenProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function DepositProgressScreen({ message }: DepositProgressScreenProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};
@@ -18,7 +18,7 @@ export function DepositProgressScreen(_a) {
18
18
  var message = _a.message;
19
19
  var sessionMode = useN1WalletInternalContext().sessionMode;
20
20
  var _b = useState(0), elapsedTime = _b[0], setElapsedTime = _b[1];
21
- var maxTime = 90; // Maximum time in seconds
21
+ var maxTime = 180; // Maximum time in seconds
22
22
  // Start timer when component mounts
23
23
  useEffect(function () {
24
24
  var timer = setInterval(function () {
@@ -37,7 +37,8 @@ export function DepositProgressScreen(_a) {
37
37
  var getSessionSpecificMessage = function () {
38
38
  var currentSessionMode = sessionMode !== null && sessionMode !== void 0 ? sessionMode : N1SessionMode.NTS;
39
39
  var accountType = currentSessionMode === N1SessionMode.Nord ? 'Nord' : 'NTS';
40
- return __assign(__assign({}, message), { title: message.title || "Processing ".concat(accountType, " Deposit"), subtitle: message.subtitle || "Please wait while we process your ".concat(accountType, " deposit") });
40
+ return __assign(__assign({}, message), { title: message.title || "Processing ".concat(accountType, " Deposit"), subtitle: message.subtitle ||
41
+ "Please wait while we process your ".concat(accountType, " deposit") });
41
42
  };
42
43
  var sessionMessage = getSessionSpecificMessage();
43
44
  return (_jsxs("div", { className: "overflow-hidden relative", children: [_jsx(WaitingMessage, { message: sessionMessage }), _jsxs("div", { className: "text-center mt-4 text-sm text-gray-500", children: ["Time elapsed: ", elapsedTime, "s / ", maxTime, "s"] })] }));
@@ -113,7 +113,9 @@ export function DepositSuccessScreen(_a) {
113
113
  };
114
114
  return (_jsx("div", { className: "relative w-full px-4", children: _jsx("div", { className: "flex flex-col space-y-6", children: _jsxs("div", { className: "w-full", children: [_jsx("div", { className: "relative w-full px-3 py-3 flex items-center justify-center transition-all duration-300 ".concat(ANIMATION_EASE, " ").concat(showDetails ? 'opacity-0 max-h-0' : 'opacity-100 max-h-[200px]'), children: _jsxs("div", { className: "relative w-full px-5 py-8 transition-all duration-300 ".concat(ANIMATION_EASE, " ").concat(showDetails ? 'max-h-0 overflow-hidden' : 'max-h-[200px]'), children: [_jsx("div", { className: "w-2 h-2 bg-green-200 dark:bg-emerald-800 absolute -top-2 -left-2 rounded-sm" }), _jsx("div", { className: "w-2 h-2 bg-green-200 dark:bg-emerald-800 absolute -top-2 -right-2 rounded-sm" }), _jsx("div", { className: "w-2 h-2 bg-green-200 dark:bg-emerald-800 absolute -bottom-2 -left-2 rounded-sm" }), _jsx("div", { className: "w-2 h-2 bg-green-200 dark:bg-emerald-800 absolute -bottom-2 -right-2 rounded-sm" }), _jsxs("p", { className: "text-5xl md:text-7xl tracking-tight text-green-500/80 dark:text-emerald-500/80 font-medium pt-4 underline text-center animate-fade-up", style: { animationDelay: '0.3s' }, children: ["+", Number(amount).toLocaleString(), _jsx("span", { className: "text-xl md:text-2xl text-green-500/50 dark:text-emerald-500/50 ml-2", children: tokenSymbol })] }), _jsx("div", { className: "absolute bottom-0 left-0 right-0 flex justify-center -mb-3", children: _jsxs("button", { onClick: toggleDetails, className: "\n group flex items-center space-x-1 px-3 py-1 text-xs font-medium \n transition-colors duration-200 focus:outline-none\n ".concat(showDetails
115
115
  ? 'text-green-600 dark:text-emerald-400 hover:text-green-700 dark:hover:text-emerald-300'
116
- : 'text-gray-500 dark:text-gray-400 hover:text-green-600 dark:hover:text-emerald-400', "\n "), children: [_jsx("span", { children: "View details" }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3 w-3 transition-transform duration-200", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }) })] }) }), _jsx("div", { className: "transition-all duration-300 ease-in-out overflow-hidden ".concat(showDetails ? 'max-h-[500px] opacity-100 -mt-4' : 'max-h-0 opacity-0'), children: _jsx(TransactionTable, { tableValues: animatedTableValues, onClose: toggleDetails }) }), _jsxs("div", { className: "mt-6", children: [showWaitingMessage && (_jsx("p", { className: "text-sm text-gray-600 dark:text-neutral-400 text-center mb-2 animate-pulse", children: "Please wait a moment..." })), _jsx("button", { onClick: isContinueEnabled ? onContinue : undefined, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-gray-200 dark:border-gray-800 hover:border-gray-400 dark:hover:border-white/60\n ").concat(!isContinueEnabled ? 'opacity-50 cursor-not-allowed' : '', "\n "), style: {
116
+ : 'text-gray-500 dark:text-gray-400 hover:text-green-600 dark:hover:text-emerald-400', "\n "), children: [_jsx("span", { children: "View details" }), _jsx("svg", { xmlns: "http://www.w3.org/2000/svg", className: "h-3 w-3 transition-transform duration-200", fill: "none", viewBox: "0 0 24 24", stroke: "currentColor", children: _jsx("path", { strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: 2, d: "M19 9l-7 7-7-7" }) })] }) })] }) }), _jsx("div", { className: "transition-all duration-300 ease-in-out overflow-hidden ".concat(showDetails
117
+ ? 'max-h-[500px] opacity-100 -mt-4'
118
+ : 'max-h-0 opacity-0'), children: _jsx(TransactionTable, { tableValues: animatedTableValues, onClose: toggleDetails }) }), _jsxs("div", { className: "mt-6", children: [showWaitingMessage && (_jsx("p", { className: "text-sm text-gray-600 dark:text-neutral-400 text-center mb-2 animate-pulse", children: "Please wait a moment..." })), _jsx("button", { onClick: isContinueEnabled ? onContinue : undefined, onMouseEnter: function () { return setIsHovered(true); }, onMouseLeave: function () { return setIsHovered(false); }, className: "\n group relative w-full overflow-hidden rounded-md border-2 bg-gray-100 dark:bg-neutral-950 py-4 text-center\n transition-all duration-300 ".concat(ANIMATION_EASE, "\n cursor-pointer border-gray-200 dark:border-gray-800 hover:border-gray-400 dark:hover:border-white/60\n ").concat(!isContinueEnabled ? 'opacity-50 cursor-not-allowed' : '', "\n "), style: {
117
119
  transform: isHovered && isContinueEnabled ? 'scale(0.99)' : 'scale(1)',
118
120
  }, disabled: !isContinueEnabled, children: _jsx("span", { className: "\n text-base font-medium tracking-wide transition-colors duration-300 ".concat(ANIMATION_EASE, "\n text-gray-700 dark:text-gray-300 group-hover:text-gray-900 dark:group-hover:text-white\n "), children: "Continue" }) })] })] }) }) }));
119
121
  }
@@ -2,5 +2,5 @@ interface AuthLoadingScreenProps {
2
2
  isCreatingAccount?: boolean;
3
3
  onAuthComplete?: (success: boolean) => void;
4
4
  }
5
- export declare function AuthLoadingScreen({ isCreatingAccount, onAuthComplete }: AuthLoadingScreenProps): import("react/jsx-runtime").JSX.Element;
5
+ export declare function AuthLoadingScreen({ isCreatingAccount, onAuthComplete, }: AuthLoadingScreenProps): import("react/jsx-runtime").JSX.Element;
6
6
  export {};