@openocean.finance/widget 1.0.35 → 1.0.36

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/widget",
3
- "version": "1.0.35",
3
+ "version": "1.0.36",
4
4
  "description": "Openocean Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.",
5
5
  "type": "module",
6
6
  "main": "./dist/esm/index.js",
@@ -47,8 +47,8 @@
47
47
  "@mui/icons-material": "6.0.2",
48
48
  "@mui/material": "^6.4.8",
49
49
  "@mui/system": "^6.4.8",
50
- "@openocean.finance/wallet-management": "^1.0.11",
51
- "@openocean.finance/widget-sdk": "^1.0.9",
50
+ "@openocean.finance/wallet-management": "^1.0.12",
51
+ "@openocean.finance/widget-sdk": "^1.0.10",
52
52
  "@across-protocol/app-sdk": "^0.2.0",
53
53
  "@near-wallet-selector/react-hook": "^9.0.0",
54
54
  "@reservoir0x/relay-sdk": "^2.4.0",
@@ -1,2 +1,2 @@
1
1
  export const name = '@openocean.finance/widget'
2
- export const version = '1.0.35'
2
+ export const version = '1.0.36'
@@ -35,7 +35,7 @@ const mappingChain: Record<string, ChainName> = {
35
35
  [ChainId.BAS]: 'base',
36
36
  [ChainId.UNI]: 'unichain',
37
37
  // [ChainId.LIN]: 'linea',
38
- // [ChainId.HYE]: 'hypercore',
38
+ [999]: 'hyperevm',
39
39
  [ChainId.SOL]: 'solana',
40
40
  [ChainId.SUI]: 'sui',
41
41
  }
@@ -46,6 +46,30 @@ import {
46
46
  type SwapStatus,
47
47
  } from './BaseSwapAdapter.js'
48
48
 
49
+ import { defineChain } from 'viem'
50
+
51
+ const hyperEvm = defineChain({
52
+ id: 999,
53
+ name: 'HyperEvm',
54
+ network: 'hyperevm',
55
+ nativeCurrency: {
56
+ decimals: 18,
57
+ name: 'HYPE',
58
+ symbol: 'HYPE',
59
+ },
60
+ rpcUrls: {
61
+ default: {
62
+ http: ['https://rpc.hyperliquid.xyz/evm'],
63
+ },
64
+ public: {
65
+ http: ['https://rpc.hyperliquid.xyz/evm'],
66
+ },
67
+ },
68
+ blockExplorers: {
69
+ default: { name: 'Explorer', url: 'https://hyperevmscan.io' },
70
+ },
71
+ })
72
+
49
73
  const SolanaChainId = 792703809
50
74
 
51
75
  const solanaChain = {
@@ -79,6 +103,7 @@ export class RelayAdapter extends BaseSwapAdapter {
79
103
  zksync,
80
104
  ronin,
81
105
  unichain,
106
+ hyperEvm,
82
107
  ]
83
108
  .map(convertViemChainToRelayChain)
84
109
  .concat(solanaChain as any),
@@ -92,7 +117,7 @@ export class RelayAdapter extends BaseSwapAdapter {
92
117
  return 'https://storage.googleapis.com/ks-setting-1d682dca/84e906bb-eaeb-45d3-a64c-2aa9c84eb3ea1747759080942.png'
93
118
  }
94
119
  getSupportedChains(): Chain[] {
95
- return [NonEvmChain.Solana, ...MAINNET_NETWORKS]
120
+ return [NonEvmChain.Solana, 999, ...MAINNET_NETWORKS]
96
121
  // return [...MAINNET_NETWORKS]
97
122
  }
98
123
 
@@ -60,9 +60,9 @@ export const FormUpdater: React.FC<{
60
60
  setSelectedBookmark(toAddress)
61
61
  }
62
62
 
63
- setUserAndDefaultValues(
64
- accountForChainId(reactiveFormValues, account.chainId)
65
- )
63
+ // setUserAndDefaultValues(
64
+ // accountForChainId(reactiveFormValues, account.chainId)
65
+ // )
66
66
  }, [
67
67
  account.chainId,
68
68
  toAddress,