@swapkit/core 1.0.0-rc.42 → 1.0.0-rc.43

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 (2) hide show
  1. package/package.json +18 -18
  2. package/src/client/index.ts +10 -10
package/package.json CHANGED
@@ -1,30 +1,30 @@
1
1
  {
2
2
  "author": "swapkit-oss-team",
3
3
  "dependencies": {
4
- "@swapkit/types": "1.0.0-rc.15",
5
- "@swapkit/helpers": "1.0.0-rc.34"
4
+ "@swapkit/types": "1.0.0-rc.16",
5
+ "@swapkit/helpers": "1.0.0-rc.35"
6
6
  },
7
7
  "description": "SwapKit Lib core",
8
8
  "devDependencies": {
9
- "@vitest/coverage-istanbul": "0.34.4",
10
- "ethers": "6.7.1",
11
- "vite": "4.4.9",
9
+ "@vitest/coverage-istanbul": "0.34.6",
10
+ "ethers": "6.9.0",
11
+ "vite": "4.5.0",
12
12
  "vite-plugin-top-level-await": "1.3.1",
13
13
  "vite-plugin-wasm": "3.2.2",
14
- "vitest": "0.34.4",
15
- "@internal/config": "0.0.0-rc.1",
16
- "@swapkit/api": "1.0.0-rc.15",
17
- "@swapkit/tokens": "1.0.0-rc.16",
18
- "@swapkit/toolbox-cosmos": "1.0.0-rc.36",
19
- "@swapkit/toolbox-evm": "1.0.0-rc.36",
20
- "@swapkit/toolbox-utxo": "1.0.0-rc.36"
14
+ "vitest": "0.34.6",
15
+ "@internal/config": "0.0.0-rc.2",
16
+ "@swapkit/api": "1.0.0-rc.16",
17
+ "@swapkit/tokens": "1.0.0-rc.17",
18
+ "@swapkit/toolbox-cosmos": "1.0.0-rc.37",
19
+ "@swapkit/toolbox-evm": "1.0.0-rc.37",
20
+ "@swapkit/toolbox-utxo": "1.0.0-rc.37"
21
21
  },
22
22
  "peerDependencies": {
23
- "@swapkit/api": "1.0.0-rc.15",
24
- "@swapkit/tokens": "1.0.0-rc.16",
25
- "@swapkit/toolbox-cosmos": "1.0.0-rc.36",
26
- "@swapkit/toolbox-evm": "1.0.0-rc.36",
27
- "@swapkit/toolbox-utxo": "1.0.0-rc.36"
23
+ "@swapkit/api": "1.0.0-rc.16",
24
+ "@swapkit/tokens": "1.0.0-rc.17",
25
+ "@swapkit/toolbox-cosmos": "1.0.0-rc.37",
26
+ "@swapkit/toolbox-evm": "1.0.0-rc.37",
27
+ "@swapkit/toolbox-utxo": "1.0.0-rc.37"
28
28
  },
29
29
  "eslintConfig": {
30
30
  "extends": "../../../internal/eslint-config"
@@ -52,7 +52,7 @@
52
52
  "repository": "https://github.com/thorswap/SwapKit.git",
53
53
  "type": "module",
54
54
  "types": "./dist/index.d.ts",
55
- "version": "1.0.0-rc.42",
55
+ "version": "1.0.0-rc.43",
56
56
  "scripts": {
57
57
  "build": "NODE_OPTIONS=--max_old_space_size=16384 vite build",
58
58
  "clean": "rm -rf dist vite.config.ts.* .turbo node_modules",
@@ -79,8 +79,8 @@ export class SwapKitCore<T = ''> {
79
79
  const evmChain = quoteMode.startsWith('ERC20-')
80
80
  ? Chain.Ethereum
81
81
  : quoteMode.startsWith('ARC20-')
82
- ? Chain.Avalanche
83
- : Chain.BinanceSmartChain;
82
+ ? Chain.Avalanche
83
+ : Chain.BinanceSmartChain;
84
84
 
85
85
  if (!route.complete) throw new SwapKitError('core_swap_route_not_complete');
86
86
 
@@ -240,8 +240,8 @@ export class SwapKitCore<T = ''> {
240
240
  chain === Chain.Avalanche
241
241
  ? TCAvalancheDepositABI
242
242
  : chain === Chain.BinanceSmartChain
243
- ? TCBscDepositABI
244
- : TCEthereumVaultAbi;
243
+ ? TCBscDepositABI
244
+ : TCEthereumVaultAbi;
245
245
 
246
246
  const response = await (
247
247
  walletInstance as EVMWallet<typeof AVAXToolbox | typeof ETHToolbox | typeof BSCToolbox>
@@ -278,10 +278,10 @@ export class SwapKitCore<T = ''> {
278
278
  const errorKey: Keys = isInsufficientFunds
279
279
  ? 'core_transaction_deposit_insufficient_funds_error'
280
280
  : isGas
281
- ? 'core_transaction_deposit_gas_error'
282
- : isServer
283
- ? 'core_transaction_deposit_server_error'
284
- : 'core_transaction_deposit_error';
281
+ ? 'core_transaction_deposit_gas_error'
282
+ : isServer
283
+ ? 'core_transaction_deposit_server_error'
284
+ : 'core_transaction_deposit_error';
285
285
 
286
286
  throw new SwapKitError(errorKey, error);
287
287
  }
@@ -423,8 +423,8 @@ export class SwapKitCore<T = ''> {
423
423
  to === 'rune'
424
424
  ? AssetValue.fromChainOrSignature(Chain.THORChain)
425
425
  : (from === 'sym' && to === 'sym') || from === 'rune' || from === 'asset'
426
- ? undefined
427
- : assetValue;
426
+ ? undefined
427
+ : assetValue;
428
428
 
429
429
  const value = getMinAmountByChain(from === 'asset' ? assetValue.chain : Chain.THORChain);
430
430
  const memoString =