@sodax/wallet-sdk-react 0.0.1-rc.2 → 0.0.1-rc.3

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,7 +1,7 @@
1
1
  {
2
2
  "name": "@sodax/wallet-sdk-react",
3
3
  "license": "MIT",
4
- "version": "0.0.1-rc.2",
4
+ "version": "0.0.1-rc.3",
5
5
  "description": "Wallet SDK of Sodax",
6
6
  "type": "module",
7
7
  "main": "./dist/index.cjs",
@@ -45,8 +45,8 @@
45
45
  "viem": "2.29.2",
46
46
  "wagmi": "^2.14.12",
47
47
  "zustand": "4.5.2",
48
- "@sodax/types": "0.0.1-rc.17",
49
- "@sodax/wallet-sdk-core": "0.0.1-rc.3"
48
+ "@sodax/wallet-sdk-core": "0.0.1-rc.4",
49
+ "@sodax/types": "0.0.1-rc.17"
50
50
  },
51
51
  "devDependencies": {
52
52
  "@types/react": "^19.0.8",
@@ -11,7 +11,7 @@ import { getXService } from '.';
11
11
  import type { XService } from './core';
12
12
  import type { XConnection } from './types';
13
13
  import { EvmXService } from './xchains/evm';
14
- import { InjectiveMetamaskXConnector, InjectiveXService } from './xchains/injective';
14
+ import { InjectiveKelprXConnector, InjectiveMetamaskXConnector, InjectiveXService } from './xchains/injective';
15
15
  import { SolanaXService } from './xchains/solana/SolanaXService';
16
16
  import { StellarXService } from './xchains/stellar';
17
17
  import { SuiXService } from './xchains/sui';
@@ -87,7 +87,7 @@ const initXServices = (config: XConfig) => {
87
87
  break;
88
88
  case 'INJECTIVE':
89
89
  xServices[xChainType] = InjectiveXService.getInstance();
90
- xServices[xChainType].setXConnectors([new InjectiveMetamaskXConnector()]);
90
+ xServices[xChainType].setXConnectors([new InjectiveMetamaskXConnector(), new InjectiveKelprXConnector()]);
91
91
  break;
92
92
  case 'STELLAR':
93
93
  xServices[xChainType] = StellarXService.getInstance();
@@ -1,18 +1,16 @@
1
1
  import { XService } from '@/core/XService';
2
2
  import { Network, getNetworkEndpoints } from '@injectivelabs/networks';
3
3
  import { ChainGrpcWasmApi, IndexerGrpcAccountPortfolioApi } from '@injectivelabs/sdk-ts';
4
- import { ChainId as InjectiveChainId, EvmChainId } from '@injectivelabs/ts-types';
5
- import { EvmWalletStrategy } from '@injectivelabs/wallet-evm';
6
- import { MsgBroadcaster, BaseWalletStrategy } from '@injectivelabs/wallet-core';
7
- import { Wallet } from '@injectivelabs/wallet-base';
8
- // import { CosmosWalletStrategy } from '@injectivelabs/wallet-cosmos';
4
+ import { ChainId as InjectiveChainId } from '@injectivelabs/ts-types';
5
+ import { MsgBroadcaster } from '@injectivelabs/wallet-core';
9
6
  import type { XToken } from '@sodax/types';
10
7
  import { mainnet } from 'wagmi/chains';
8
+ import { WalletStrategy } from '@injectivelabs/wallet-strategy';
11
9
 
12
10
  export class InjectiveXService extends XService {
13
11
  private static instance: InjectiveXService;
14
12
 
15
- public walletStrategy: BaseWalletStrategy;
13
+ public walletStrategy: WalletStrategy;
16
14
  public indexerGrpcAccountPortfolioApi: IndexerGrpcAccountPortfolioApi;
17
15
  public chainGrpcWasmApi: ChainGrpcWasmApi;
18
16
  public msgBroadcaster: MsgBroadcaster;
@@ -21,23 +19,16 @@ export class InjectiveXService extends XService {
21
19
  super('INJECTIVE');
22
20
 
23
21
  const endpoints = getNetworkEndpoints(Network.Mainnet);
24
- this.walletStrategy = new BaseWalletStrategy({
22
+
23
+ this.walletStrategy = new WalletStrategy({
25
24
  chainId: InjectiveChainId.Mainnet,
26
- strategies: {
27
- [Wallet.Metamask]: new EvmWalletStrategy({
28
- chainId: InjectiveChainId.Mainnet,
29
- wallet: Wallet.Metamask,
30
- evmOptions: {
31
- evmChainId: EvmChainId.Mainnet,
32
- rpcUrl: mainnet.rpcUrls.default.http[0],
33
- },
34
- }),
35
- // [Wallet.Keplr]: new CosmosWalletStrategy({
36
- // chainId: InjectiveChainId.Mainnet,
37
- // wallet: Wallet.Keplr,
38
- // }),
25
+ strategies: {},
26
+ evmOptions: {
27
+ evmChainId: mainnet.id,
28
+ rpcUrl: mainnet.rpcUrls.default.http[0],
39
29
  },
40
30
  });
31
+
41
32
  this.indexerGrpcAccountPortfolioApi = new IndexerGrpcAccountPortfolioApi(endpoints.indexer);
42
33
  this.chainGrpcWasmApi = new ChainGrpcWasmApi(endpoints.grpc);
43
34
  this.msgBroadcaster = new MsgBroadcaster({