@xswap-link/sdk 0.8.7 → 0.9.1
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.
- package/.github/workflows/main.yml +2 -1
- package/CHANGELOG.md +12 -0
- package/babel.config.cjs +8 -0
- package/dist/index.d.mts +4 -2
- package/dist/index.d.ts +4 -2
- package/dist/index.global.js +132 -135
- package/dist/index.js +9 -9
- package/dist/index.mjs +10 -10
- package/jest.config.ts +37 -0
- package/package.json +17 -5
- package/src/components/Modal/index.tsx +1 -1
- package/src/components/Swap/Header/index.tsx +1 -1
- package/src/components/Swap/ReorderButton/ReorderButton.tsx +12 -10
- package/src/components/Swap/SwapView/FeesPanel/index.tsx +1 -1
- package/src/components/Swap/SwapView/SwapButton/index.tsx +23 -21
- package/src/components/Swap/SwapView/SwapPanel/AmountPanel/index.tsx +4 -2
- package/src/components/Swap/SwapView/SwapPanel/ChainPanel/ChainPicker/ChainItem/index.tsx +51 -59
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/TokenItem/index.tsx +47 -13
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/TokenPicker/index.tsx +138 -35
- package/src/components/Swap/SwapView/SwapPanel/TokenPanel/index.tsx +6 -2
- package/src/components/Swap/SwapView/SwapPanel/index.tsx +1 -1
- package/src/components/Swap/SwapView/index.tsx +2 -2
- package/src/components/Tooltip/index.tsx +1 -1
- package/src/context/HistoryProvider.tsx +2 -2
- package/src/context/SwapProvider.tsx +174 -100
- package/src/context/TransactionProvider.tsx +1 -1
- package/src/models/TokenData.ts +3 -1
- package/src/models/payloads/GetPricesPayload.ts +1 -1
- package/src/utils/validation.ts +50 -16
- package/tailwind.config.js +1 -0
- package/test/context/SwapProvider.test.tsx +851 -0
- package/test/fileMock.ts +1 -0
- package/test/fixtures/bridgeTokens.mock.ts +1318 -0
- package/test/fixtures/bridgeTokensDictionary.mock.ts +1272 -0
- package/test/fixtures/integrationConfig.mock.ts +10 -0
- package/test/fixtures/supportedChains.mock.ts +32950 -0
- package/test/{api.test.ts → services/getChains.test.ts} +6 -5
- package/test/setup.ts +13 -0
- package/test/styleMock.ts +1 -0
- package/jest.config.json +0 -8
- package/test/api.mock.ts +0 -106
- package/test/setupTests.ts +0 -3
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @xswap-link/xswap-sdk
|
|
2
2
|
|
|
3
|
+
## 0.9.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 615902c: Feat: add token values in token picker
|
|
8
|
+
|
|
9
|
+
## 0.9.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- ce3372c: Release: update token and chain handeling"
|
|
14
|
+
|
|
3
15
|
## 0.8.7
|
|
4
16
|
|
|
5
17
|
### Patch Changes
|
package/babel.config.cjs
ADDED
package/dist/index.d.mts
CHANGED
|
@@ -106,7 +106,7 @@ type GetLeaderboardChangePayload = {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
type GetPricesPayload = {
|
|
109
|
-
chainId: string;
|
|
109
|
+
chainId: string[];
|
|
110
110
|
currency?: string;
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -311,7 +311,9 @@ type Prices = {
|
|
|
311
311
|
prices: TokenPrices;
|
|
312
312
|
};
|
|
313
313
|
type TokenPrices = {
|
|
314
|
-
[
|
|
314
|
+
[chainId: string]: {
|
|
315
|
+
[tokenAddress: string]: string;
|
|
316
|
+
};
|
|
315
317
|
};
|
|
316
318
|
type TokenBalances = {
|
|
317
319
|
[tokenAddress: string]: BigNumber | undefined;
|
package/dist/index.d.ts
CHANGED
|
@@ -106,7 +106,7 @@ type GetLeaderboardChangePayload = {
|
|
|
106
106
|
};
|
|
107
107
|
|
|
108
108
|
type GetPricesPayload = {
|
|
109
|
-
chainId: string;
|
|
109
|
+
chainId: string[];
|
|
110
110
|
currency?: string;
|
|
111
111
|
};
|
|
112
112
|
|
|
@@ -311,7 +311,9 @@ type Prices = {
|
|
|
311
311
|
prices: TokenPrices;
|
|
312
312
|
};
|
|
313
313
|
type TokenPrices = {
|
|
314
|
-
[
|
|
314
|
+
[chainId: string]: {
|
|
315
|
+
[tokenAddress: string]: string;
|
|
316
|
+
};
|
|
315
317
|
};
|
|
316
318
|
type TokenBalances = {
|
|
317
319
|
[tokenAddress: string]: BigNumber | undefined;
|