From a3c424d5346f822276ef81a1bae3925fa876eb25 Mon Sep 17 00:00:00 2001 From: xpyctumo <30053565+xpyctumo@users.noreply.github.com> Date: Tue, 8 Jul 2025 16:57:16 +0300 Subject: [PATCH] fix: prettier --- src/components/NetworkSwitcher.css | 2 +- src/components/Swap.css | 55 +- src/components/SwapProgress.css | 5 +- src/components/SwapProgress.tsx | 42 +- src/components/TokenSelector.tsx | 67 +- src/constants/features.ts | 48 +- src/constants/swapSteps.ts | 2 +- src/contexts/NetworkContext.tsx | 6 +- src/polyfills.ts | 12 +- src/providers/index.tsx | 3 +- src/services/wrappers/DEX_AmmPool.ts | 9537 ++++++++++------- src/services/wrappers/DEX_Factory.ts | 9293 +++++++++------- src/services/wrappers/DEX_JettonVault.ts | 9264 +++++++++------- src/services/wrappers/DEX_TonVault.ts | 9242 +++++++++------- .../FeatureRich_JettonMinterFeatureRich.ts | 3994 ++++--- .../FeatureRich_JettonWalletFeatureRich.ts | 3898 ++++--- src/services/wrappers/Jetton_JettonMinter.ts | 3821 ++++--- src/styles/App.css | 4 +- src/styles/JettonFeatureSelector.css | 8 +- src/styles/JettonMinter.css | 2 +- src/styles/fonts.css | 19 +- src/styles/snippets/Toaster.tsx | 34 +- src/styles/snippets/Tooltip.tsx | 72 +- src/styles/snippets/color-mode.tsx | 31 +- src/utils/format.ts | 12 +- src/utils/random-jetton.ts | 5 +- 26 files changed, 30166 insertions(+), 19312 deletions(-) diff --git a/src/components/NetworkSwitcher.css b/src/components/NetworkSwitcher.css index 3829e21..360bc0e 100644 --- a/src/components/NetworkSwitcher.css +++ b/src/components/NetworkSwitcher.css @@ -28,4 +28,4 @@ .network-button.active { color: var(--color-text); background-color: var(--color-surface); -} \ No newline at end of file +} diff --git a/src/components/Swap.css b/src/components/Swap.css index de96e33..5b6e3a3 100644 --- a/src/components/Swap.css +++ b/src/components/Swap.css @@ -4,7 +4,7 @@ padding: 1.5rem; background: #181a20; border-radius: 1.5rem; - box-shadow: 0 4px 24px rgba(0,0,0,0.2); + box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2); color: #fff; display: flex; flex-direction: column; @@ -69,8 +69,6 @@ color: #555; } - - .amount-setter { display: flex; justify-content: flex-end; @@ -113,8 +111,11 @@ color: #00aaff; cursor: pointer; margin: 0.25rem 0; - transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease; - box-shadow: 0 2px 8px rgba(0,170,255,0.04); + transition: + background 0.2s ease, + border-color 0.2s ease, + box-shadow 0.2s ease; + box-shadow: 0 2px 8px rgba(0, 170, 255, 0.04); display: flex; align-items: center; justify-content: center; @@ -123,7 +124,7 @@ .swap-direction:hover { background: #00aaff22; border-color: #00aaff; - box-shadow: 0 4px 16px rgba(0,170,255,0.15); + box-shadow: 0 4px 16px rgba(0, 170, 255, 0.15); } .swap-direction:active { @@ -194,15 +195,18 @@ display: flex; align-items: center; justify-content: space-between; - transition: background 0.2s, box-shadow 0.2s; - box-shadow: 0 2px 8px rgba(0,170,255,0.04); + transition: + background 0.2s, + box-shadow 0.2s; + box-shadow: 0 2px 8px rgba(0, 170, 255, 0.04); height: 3rem; box-sizing: border-box; } -.tact-dropdown-btn:focus, .tact-dropdown-btn:hover { +.tact-dropdown-btn:focus, +.tact-dropdown-btn:hover { background: #1a2233; color: #00aaff; - box-shadow: 0 4px 16px rgba(0,170,255,0.10); + box-shadow: 0 4px 16px rgba(0, 170, 255, 0.1); } .tact-dropdown-menu { @@ -212,7 +216,7 @@ width: 100%; background: #23262f; border-radius: 12px; - box-shadow: 0 4px 16px rgba(0,170,255,0.10); + box-shadow: 0 4px 16px rgba(0, 170, 255, 0.1); z-index: 10; overflow: hidden; border: 1px solid #00aaff33; @@ -223,10 +227,13 @@ cursor: pointer; color: #fff; font-size: 1.05rem; - transition: background 0.15s, color 0.15s; + transition: + background 0.15s, + color 0.15s; background: none; } -.tact-dropdown-item:hover, .tact-dropdown-item:focus { +.tact-dropdown-item:hover, +.tact-dropdown-item:focus { background: #00aaff22 !important; color: #00aaff !important; } @@ -237,23 +244,25 @@ } /* Custom input for jetton address */ -.swap-section input[type="text"] { +.swap-section input[type='text'] { background: #181a20; border: 1px solid #00aaff33; color: #fff; border-radius: 12px; padding: 0.75rem; font-size: 1.1rem; - transition: border 0.2s, box-shadow 0.2s; + transition: + border 0.2s, + box-shadow 0.2s; } -.swap-section input[type="text"]:focus { +.swap-section input[type='text']:focus { border: 1.5px solid #00aaff; box-shadow: 0 0 0 2px #00aaff33; outline: none; } /* Make address input same size as dropdown */ -.tact-dropdown + input[type="text"] { +.tact-dropdown + input[type='text'] { width: 180px; background: #23262f; border-radius: 12px; @@ -262,11 +271,13 @@ border: none; color: #fff; margin-top: 0.5rem; - transition: box-shadow 0.2s, border 0.2s; - box-shadow: 0 2px 8px rgba(0,170,255,0.04); + transition: + box-shadow 0.2s, + border 0.2s; + box-shadow: 0 2px 8px rgba(0, 170, 255, 0.04); } -.tact-dropdown + input[type="text"]:focus { - box-shadow: 0 4px 16px rgba(0,170,255,0.10); +.tact-dropdown + input[type='text']:focus { + box-shadow: 0 4px 16px rgba(0, 170, 255, 0.1); border: 1.5px solid #00aaff; background: #1a2233; -} \ No newline at end of file +} diff --git a/src/components/SwapProgress.css b/src/components/SwapProgress.css index b9d61ec..0fea33f 100644 --- a/src/components/SwapProgress.css +++ b/src/components/SwapProgress.css @@ -131,7 +131,8 @@ } @keyframes pulse { - 0%, 100% { + 0%, + 100% { opacity: 1; } 50% { @@ -187,4 +188,4 @@ background: #2d3748; cursor: not-allowed; opacity: 0.6; -} \ No newline at end of file +} diff --git a/src/components/SwapProgress.tsx b/src/components/SwapProgress.tsx index df822d5..6c2230d 100644 --- a/src/components/SwapProgress.tsx +++ b/src/components/SwapProgress.tsx @@ -35,37 +35,41 @@ const SwapProgress: React.FC = ({ return '✗' case 'loading': return ( -
-
+
+
) default: - return SWAP_STEPS.findIndex(step => step.id === stepId) + 1 + return SWAP_STEPS.findIndex((step) => step.id === stepId) + 1 } } - const isCompleted = SWAP_STEPS.every(step => stepStatuses[step.id] === 'success') - const hasError = SWAP_STEPS.some(step => stepStatuses[step.id] === 'error') + const isCompleted = SWAP_STEPS.every((step) => stepStatuses[step.id] === 'success') + const hasError = SWAP_STEPS.some((step) => stepStatuses[step.id] === 'error') return ( -
-
-
-

+
+
+
+

{isCompleted ? 'Swap Completed!' : hasError ? 'Swap Failed' : 'Processing Swap'}

{fromTokenSymbol && toTokenSymbol && (fromAmount || toAmount) && ( -

+

{fromAmount && toAmount ? ( - <>Swap {fromAmount} {fromTokenSymbol} to {toAmount} {toTokenSymbol} + <> + Swap {fromAmount} {fromTokenSymbol} to {toAmount} {toTokenSymbol} + ) : ( - <>Swap {amount} {fromTokenSymbol} to {toTokenSymbol} + <> + Swap {amount} {fromTokenSymbol} to {toTokenSymbol} + )}

)}
-
+
{SWAP_STEPS.map((step) => { const status = stepStatuses[step.id] return ( @@ -73,19 +77,15 @@ const SwapProgress: React.FC = ({ key={step.id} className={`swap-progress-step ${status}`} > -
- {getStepIcon(step.id, status)} -
-
- {step.label} -
+
{getStepIcon(step.id, status)}
+
{step.label}
) })}