1
- import " ../styles/globals.css" ;
2
- import " @interchain-ui/react/styles" ;
1
+ import ' ../styles/globals.css' ;
2
+ import ' @interchain-ui/react/styles' ;
3
3
4
- import type { AppProps } from "next/app" ;
5
- import { QueryClientProvider , QueryClient } from "@tanstack/react-query" ;
6
- import { ChainProvider } from "@interchain-kit/react" ;
7
- import { defaultAssetList , defaultChain } from "../config/defaults" ;
8
- import { keplrWallet } from "@interchain-kit/keplr-extension" ;
9
- import { leapWallet } from "@interchain-kit/leap-extension" ;
4
+ import type { AppProps } from 'next/app' ;
5
+ import { QueryClientProvider , QueryClient } from '@tanstack/react-query' ;
6
+ import { ChainProvider } from '@interchain-kit/react' ;
7
+ import { defaultAssetList , defaultChain } from '../config/defaults' ;
8
+ import { keplrWallet } from '@interchain-kit/keplr-extension' ;
9
+ import { leapWallet } from '@interchain-kit/leap-extension' ;
10
+ import { defaultSignerOptions } from '@interchainjs/injective/defaults' ;
10
11
import {
11
12
Box ,
12
13
ThemeProvider ,
13
14
Toaster ,
14
15
useTheme ,
15
16
useColorModeValue ,
16
- } from " @interchain-ui/react" ;
17
- import { defaultRpcEndpoint } from " @/config" ;
17
+ } from ' @interchain-ui/react' ;
18
+ import { defaultRpcEndpoint } from ' @/config' ;
18
19
const queryClient = new QueryClient ( {
19
20
defaultOptions : {
20
21
queries : {
@@ -36,18 +37,21 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
36
37
assetLists = { [ defaultAssetList ! ] }
37
38
wallets = { [ keplrWallet , leapWallet ] }
38
39
signerOptions = { {
39
- signing : ( ) => {
40
- return {
41
- broadcast : {
42
- checkTx : true ,
43
- deliverTx : true ,
44
- } ,
45
- } ;
40
+ signing : ( chain ) => {
41
+ if ( chain === 'injective' ) {
42
+ return {
43
+ signerOptions : defaultSignerOptions . Cosmos ,
44
+ broadcast : {
45
+ checkTx : true ,
46
+ deliverTx : true ,
47
+ } ,
48
+ } ;
49
+ }
46
50
} ,
47
51
} }
48
52
endpointOptions = { {
49
53
endpoints : {
50
- " injective" : {
54
+ injective : {
51
55
rpc : [ defaultRpcEndpoint ] ,
52
56
} ,
53
57
} ,
@@ -57,7 +61,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
57
61
< Box
58
62
className = { themeClass }
59
63
minHeight = "100dvh"
60
- backgroundColor = { useColorModeValue ( " $white" , " $background" ) }
64
+ backgroundColor = { useColorModeValue ( ' $white' , ' $background' ) }
61
65
>
62
66
{ /* TODO fix type error */ }
63
67
{ /* @ts -ignore */ }
@@ -66,7 +70,7 @@ function CreateCosmosApp({ Component, pageProps }: AppProps) {
66
70
</ QueryClientProvider >
67
71
</ ChainProvider >
68
72
69
- < Toaster position = { " top-right" } closeButton = { true } />
73
+ < Toaster position = { ' top-right' } closeButton = { true } />
70
74
</ ThemeProvider >
71
75
) ;
72
76
}
0 commit comments