@xswap-link/sdk 0.8.6 → 0.9.0

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 (41) hide show
  1. package/.github/workflows/main.yml +2 -1
  2. package/.github/workflows/pr_agent.yml +22 -0
  3. package/CHANGELOG.md +12 -0
  4. package/babel.config.cjs +8 -0
  5. package/dist/index.global.js +130 -133
  6. package/dist/index.js +10 -10
  7. package/dist/index.mjs +10 -10
  8. package/jest.config.ts +37 -0
  9. package/package.json +17 -5
  10. package/src/components/Modal/index.tsx +1 -1
  11. package/src/components/Swap/Header/index.tsx +1 -1
  12. package/src/components/Swap/ReorderButton/ReorderButton.tsx +12 -10
  13. package/src/components/Swap/SwapView/FeesPanel/index.tsx +1 -1
  14. package/src/components/Swap/SwapView/SwapButton/index.tsx +23 -21
  15. package/src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx +4 -2
  16. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/ChainPicker/ChainItem/index.tsx +5 -7
  17. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/ChainPicker/index.tsx +18 -2
  18. package/src/components/Swap/SwapView/SwapPanel/ChainPanel/index.tsx +1 -24
  19. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/QuickPickTokenItem/index.tsx +2 -11
  20. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +12 -3
  21. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +124 -34
  22. package/src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx +1 -1
  23. package/src/components/Swap/SwapView/index.tsx +1 -1
  24. package/src/constants/index.ts +1 -1
  25. package/src/context/HistoryProvider.tsx +2 -2
  26. package/src/context/SwapProvider.tsx +163 -53
  27. package/src/context/TransactionProvider.tsx +1 -1
  28. package/src/utils/validation.ts +239 -186
  29. package/tailwind.config.js +1 -0
  30. package/test/context/SwapProvider.test.tsx +851 -0
  31. package/test/fileMock.ts +1 -0
  32. package/test/fixtures/bridgeTokens.mock.ts +1318 -0
  33. package/test/fixtures/bridgeTokensDictionary.mock.ts +1272 -0
  34. package/test/fixtures/integrationConfig.mock.ts +10 -0
  35. package/test/fixtures/supportedChains.mock.ts +32950 -0
  36. package/test/{api.test.ts → services/getChains.test.ts} +6 -5
  37. package/test/setup.ts +13 -0
  38. package/test/styleMock.ts +1 -0
  39. package/jest.config.json +0 -8
  40. package/test/api.mock.ts +0 -106
  41. package/test/setupTests.ts +0 -3
@@ -14,8 +14,9 @@ jobs:
14
14
  version: 7
15
15
  - uses: actions/setup-node@v3
16
16
  with:
17
- node-version: 16.x
17
+ node-version: 18.x
18
18
  cache: "pnpm"
19
19
 
20
20
  - run: pnpm install
21
21
  - run: pnpm run lint && pnpm run build
22
+ - run: pnpm run test
@@ -0,0 +1,22 @@
1
+ name: AI Review
2
+
3
+ on:
4
+ pull_request:
5
+ types: [opened]
6
+ issue_comment:
7
+ jobs:
8
+ pr_agent_job:
9
+ if: ${{ github.event.sender.type != 'Bot' }}
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ issues: write
13
+ pull-requests: write
14
+ contents: write
15
+ name: Run pr agent on every pull request, respond to user comments
16
+ steps:
17
+ - name: PR Agent action step
18
+ id: pragent
19
+ uses: Codium-ai/pr-agent@main
20
+ env:
21
+ OPENAI_KEY: ${{ secrets.OPENAI_KEY }}
22
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @xswap-link/xswap-sdk
2
2
 
3
+ ## 0.9.0
4
+
5
+ ### Minor Changes
6
+
7
+ - ce3372c: Release: update token and chain handeling"
8
+
9
+ ## 0.8.7
10
+
11
+ ### Patch Changes
12
+
13
+ - c3b4ce3: Change initial chain and token values according to new specs
14
+
3
15
  ## 0.8.6
4
16
 
5
17
  ### Patch Changes
@@ -0,0 +1,8 @@
1
+ // eslint-disable-next-line no-undef
2
+ module.exports = {
3
+ presets: [
4
+ ["@babel/preset-env", { targets: { esmodules: true } }],
5
+ ["@babel/preset-react", { runtime: "automatic" }],
6
+ "@babel/preset-typescript",
7
+ ],
8
+ };