Skip to content

Commit 2ea35f5

Browse files
authored
Merge branch 'main' into refactor/reserve-overview-page-sdk
2 parents d31da54 + 2fe889e commit 2ea35f5

File tree

272 files changed

+21647
-10305
lines changed

Some content is hidden

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

272 files changed

+21647
-10305
lines changed

.eslintignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ src/locales/
2020
*.md
2121
*.log
2222
*.lock
23+
24+
src/components/transactions/Swap/backup/**/*.*

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ yarn-error.log*
4242
package-lock.json
4343

4444
.eslintcache
45+
.yarn-cache
4546

4647
# IDE specific
4748
.idea

.npmrc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Uncomment for CoW Preview Releases
2+
3+
# @cowprotocol:registry=https://npm.pkg.github.com
4+
# always-auth=true
5+
# # registry=https://registry.npmjs.org/
6+
# //npm.pkg.github.com/:_authToken=${GITHUB_TOKEN}

package.json

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,10 @@
3636
"@aave/math-utils": "1.36.1",
3737
"@aave/react": "^0.7.1",
3838
"@amplitude/analytics-browser": "^2.13.0",
39-
"@bgd-labs/aave-address-book": "^4.34.1",
40-
"@cowprotocol/app-data": "^3.1.0",
41-
"@cowprotocol/cow-sdk": "6.0.0-RC.47",
39+
"@bgd-labs/aave-address-book": "^4.36.3",
40+
"@cowprotocol/cow-sdk": "7.1.1",
41+
"@cowprotocol/sdk-flash-loans": "1.5.3",
42+
"@cowprotocol/sdk-ethers-v5-adapter": "0.2.0",
4243
"@emotion/cache": "11.10.3",
4344
"@emotion/react": "11.10.4",
4445
"@emotion/server": "latest",
@@ -50,6 +51,7 @@
5051
"@mui/icons-material": "^5.10.14",
5152
"@mui/lab": "5.0.0-alpha.103",
5253
"@mui/material": "^5.10.9",
54+
"@number-flow/react": "^0.5.10",
5355
"@paraswap/sdk": "6.10.0",
5456
"@safe-global/safe-apps-provider": "^0.18.4",
5557
"@safe-global/safe-apps-sdk": "^9.1.0",
@@ -78,7 +80,7 @@
7880
"immer": "^9.0.15",
7981
"json-stringify-deterministic": "^1.0.12",
8082
"micro-memoize": "^4.1.2",
81-
"next": "12.3.4",
83+
"next": "12.3.7",
8284
"react": "^18.0.0",
8385
"react-cookie-consent": "^8.0.1",
8486
"react-dom": "^18.0.0",

pages/_app.page.tsx

Lines changed: 29 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ import { AddressBlocked } from 'src/components/AddressBlocked';
1616
import { Meta } from 'src/components/Meta';
1717
import { TransactionEventHandler } from 'src/components/TransactionEventHandler';
1818
import { GasStationProvider } from 'src/components/transactions/GasStation/GasStationProvider';
19-
import { CowOrderToast } from 'src/components/transactions/Switch/cowprotocol/CowOrderToast';
19+
import { CowOrderToast } from 'src/components/transactions/Swap/modals/result/CowOrderToast';
2020
import { AppDataProvider } from 'src/hooks/app-data-provider/useAppDataProvider';
21-
import { CowOrderToastProvider } from 'src/hooks/useCowOrderToast';
2221
import { ModalContextProvider } from 'src/hooks/useModal';
22+
import { SwapOrdersTrackingProvider } from 'src/hooks/useSwapOrdersTracking';
2323
import { Web3ContextProvider } from 'src/libs/web3-data-provider/Web3Provider';
2424
import { useRootStore } from 'src/store/root';
2525
import { SharedDependenciesProvider } from 'src/ui-config/SharedDependenciesProvider';
@@ -31,16 +31,22 @@ import createEmotionCache from '../src/createEmotionCache';
3131
import { AppGlobalStyles } from '../src/layouts/AppGlobalStyles';
3232
import { LanguageProvider } from '../src/libs/LanguageProvider';
3333

34-
const SwitchModal = dynamic(() =>
35-
import('src/components/transactions/Switch/SwitchModal').then((module) => module.SwitchModal)
34+
const SwapModal = dynamic(() =>
35+
import('src/components/transactions/Swap/modals/SwapModal').then((module) => module.SwapModal)
3636
);
3737

3838
const CollateralSwapModal = dynamic(() =>
39-
import('src/components/transactions/Switch/CollateralSwap/CollateralSwapModal').then(
39+
import('src/components/transactions/Swap/modals/CollateralSwapModal').then(
4040
(module) => module.CollateralSwapModal
4141
)
4242
);
4343

44+
const DebtSwapModal = dynamic(() =>
45+
import('src/components/transactions/Swap/modals/DebtSwapModal').then(
46+
(module) => module.DebtSwapModal
47+
)
48+
);
49+
4450
const BridgeModal = dynamic(() =>
4551
import('src/components/transactions/Bridge/BridgeModal').then((module) => module.BridgeModal)
4652
);
@@ -53,16 +59,6 @@ const ClaimRewardsModal = dynamic(() =>
5359
(module) => module.ClaimRewardsModal
5460
)
5561
);
56-
const CollateralChangeModal = dynamic(() =>
57-
import('src/components/transactions/CollateralChange/CollateralChangeModal').then(
58-
(module) => module.CollateralChangeModal
59-
)
60-
);
61-
const DebtSwitchModal = dynamic(() =>
62-
import('src/components/transactions/DebtSwitch/DebtSwitchModal').then(
63-
(module) => module.DebtSwitchModal
64-
)
65-
);
6662
const EmodeModal = dynamic(() =>
6763
import('src/components/transactions/Emode/EmodeModal').then((module) => module.EmodeModal)
6864
);
@@ -85,9 +81,19 @@ const StakingMigrateModal = dynamic(() =>
8581
(module) => module.StakingMigrateModal
8682
)
8783
);
84+
const CancelCowOrderModal = dynamic(() =>
85+
import('src/components/transactions/CancelCowOrder/CancelCowOrderModal').then(
86+
(module) => module.CancelCowOrderModal
87+
)
88+
);
8889
const ReadOnlyModal = dynamic(() =>
8990
import('src/components/WalletConnection/ReadOnlyModal').then((module) => module.ReadOnlyModal)
9091
);
92+
const CollateralChangeModal = dynamic(() =>
93+
import('src/components/transactions/CollateralChange/CollateralChangeModal').then(
94+
(module) => module.CollateralChangeModal
95+
)
96+
);
9197

9298
// Client-side cache, shared for the whole session of the user in the browser.
9399
const clientSideEmotionCache = createEmotionCache();
@@ -155,7 +161,7 @@ export default function MyApp(props: MyAppProps) {
155161
<Web3ContextProvider>
156162
<AppGlobalStyles>
157163
<AddressBlocked>
158-
<CowOrderToastProvider>
164+
<SwapOrdersTrackingProvider>
159165
<ModalContextProvider>
160166
<SharedDependenciesProvider>
161167
<AppDataProvider>
@@ -166,22 +172,25 @@ export default function MyApp(props: MyAppProps) {
166172
<BorrowModal />
167173
<RepayModal />
168174
<CollateralChangeModal />
169-
<DebtSwitchModal />
170175
<ClaimRewardsModal />
171176
<EmodeModal />
172177
<FaucetModal />
173178
<TransactionEventHandler />
174-
<SwitchModal />
175-
<CollateralSwapModal />
176179
<StakingMigrateModal />
177180
<BridgeModal />
178181
<ReadOnlyModal />
182+
183+
{/* Swap Modals */}
184+
<SwapModal />
185+
<CollateralSwapModal />
186+
<DebtSwapModal />
187+
<CancelCowOrderModal />
179188
<CowOrderToast />
180189
</GasStationProvider>
181190
</AppDataProvider>
182191
</SharedDependenciesProvider>
183192
</ModalContextProvider>
184-
</CowOrderToastProvider>
193+
</SwapOrdersTrackingProvider>
185194
</AddressBlocked>
186195
</AppGlobalStyles>
187196
</Web3ContextProvider>

pages/api/support-create-ticket.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ export default async function handler(req: NextApiRequest, res: NextApiResponse)
155155
},
156156
},
157157
],
158-
labelTypeIds: ['lt_01K36FQ2J7ZGXQ55RV769TJHYN'],
159158
},
160159
};
161160
const result = await makeGraphQLRequest(CREATE_THREAD_MUTATION, createThreadVariables);

public/icons/networks/plasma.svg

Lines changed: 1 addition & 4 deletions
Loading

public/icons/tokens/fbtc.svg

Lines changed: 1 addition & 1 deletion
Loading

public/icons/tokens/kbtc.svg

Lines changed: 1 addition & 0 deletions
Loading

public/icons/tokens/syrupusdt.svg

Lines changed: 1 addition & 0 deletions
Loading

0 commit comments

Comments
 (0)