Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions apps/sdk-tools/src/main.tsx
Original file line number Diff line number Diff line change
@@ -1,10 +1,20 @@
import { StrictMode } from 'react'

import 'inter-ui'
import { getRpcProvider } from '@cowprotocol/common-const'
import { setGlobalAdapter, SupportedChainId } from '@cowprotocol/cow-sdk'
import { EthersV5Adapter } from '@cowprotocol/sdk-ethers-v5-adapter'

import { createRoot } from 'react-dom/client'

import { SdkTools } from './SdkTools'

// Initialize the global adapter for the CoW SDK
const adapter = new EthersV5Adapter({
provider: getRpcProvider(SupportedChainId.MAINNET)!,
})
setGlobalAdapter(adapter)

// TODO: Add proper return type annotation
// eslint-disable-next-line @typescript-eslint/explicit-function-return-type
function Root() {
Expand Down
4 changes: 1 addition & 3 deletions apps/sdk-tools/tsconfig.app.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@
"extends": "./tsconfig.json",
"compilerOptions": {
"outDir": "../../dist/out-tsc",
"types": ["node", "vite/client"],
"composite": true,
"declaration": true
"types": ["node", "vite/client"]
},
"files": ["../../node_modules/@nx/react/typings/cssmodule.d.ts", "../../node_modules/@nx/react/typings/image.d.ts"],
"exclude": [
Expand Down
11 changes: 11 additions & 0 deletions apps/sdk-tools/vercel.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
],
"buildCommand": "cd ../../ && yarn build:sdk-tools",
"outputDirectory": "../../build/sdk-tools",
"installCommand": "cd ../../ && yarn run install:ci"
}