File tree 5 files changed +13
-16
lines changed
5 files changed +13
-16
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ import BN from "@src/utils/BN";
17
17
import {
18
18
CONTRACT_ADDRESSES ,
19
19
INDEXER_URL ,
20
- NETWORKS ,
20
+ NETWORK ,
21
21
PYTH_URL ,
22
22
TOKENS_BY_ASSET_ID ,
23
23
TOKENS_BY_SYMBOL ,
@@ -39,13 +39,13 @@ export class FuelNetwork {
39
39
private walletManager = new WalletManager ( ) ;
40
40
private orderbookSdk : SparkOrderBookSdk ;
41
41
42
- public network = NETWORKS [ 0 ] ;
42
+ public network = NETWORK ;
43
43
44
44
private constructor ( ) {
45
45
makeObservable ( this . walletManager ) ;
46
46
47
47
this . orderbookSdk = new SparkOrderBookSdk ( {
48
- networkUrl : NETWORKS [ 0 ] . url ,
48
+ networkUrl : NETWORK . url ,
49
49
contractAddresses : CONTRACT_ADDRESSES ,
50
50
indexerApiUrl : INDEXER_URL ,
51
51
pythUrl : PYTH_URL ,
Original file line number Diff line number Diff line change @@ -16,12 +16,10 @@ export interface Network {
16
16
url : string ;
17
17
}
18
18
19
- export const NETWORKS : Network [ ] = [
20
- {
21
- name : "Fuel" ,
22
- url : "https://testnet.fuel.network/v1/graphql" ,
23
- } ,
24
- ] ;
19
+ export const NETWORK : Network = {
20
+ name : "Fuel" ,
21
+ url : "https://beta-5.fuel.network/graphql" ,
22
+ } ;
25
23
26
24
export const EXPLORER_URL = "https://app.fuel.network/" ;
27
25
Original file line number Diff line number Diff line change 1
1
import React , { useState } from "react" ;
2
2
import styled from "@emotion/styled" ;
3
- import { useDisconnect } from "@fuels/react" ;
4
3
import copy from "copy-to-clipboard" ;
5
4
import { observer } from "mobx-react" ;
6
5
@@ -23,8 +22,7 @@ import ConnectedWalletButton from "./ConnectedWalletButton";
23
22
24
23
const ConnectedWallet : React . FC = observer ( ( ) => {
25
24
const { accountStore, notificationStore, balanceStore } = useStores ( ) ;
26
- const { address } = useWallet ( ) ;
27
- const { disconnect } = useDisconnect ( ) ;
25
+ const { address, disconnect } = useWallet ( ) ;
28
26
29
27
const [ isFocused , setIsFocused ] = useState ( false ) ;
30
28
@@ -60,7 +58,7 @@ const ConnectedWallet: React.FC = observer(() => {
60
58
} ,
61
59
{
62
60
icon : logoutIcon ,
63
- action : ( ) => disconnect ( ) ,
61
+ action : ( ) => disconnectWallet ( ) ,
64
62
title : "Disconnect" ,
65
63
active : true ,
66
64
} ,
Original file line number Diff line number Diff line change 1
1
import React from "react" ;
2
2
import styled from "@emotion/styled" ;
3
- import { useDisconnect } from "@fuels/react" ;
4
3
import copy from "copy-to-clipboard" ;
5
4
6
5
import copyIcon from "@src/assets/icons/copy.svg" ;
@@ -24,9 +23,8 @@ interface Props {
24
23
}
25
24
26
25
const AccountInfoSheet : React . FC < Props > = ( { isOpen, onClose } ) => {
26
+ const { disconnect } = useWallet ( ) ;
27
27
const { accountStore, notificationStore, balanceStore } = useStores ( ) ;
28
- const { balance } = useWallet ( ) ;
29
- const { disconnect } = useDisconnect ( ) ;
30
28
31
29
const bcNetwork = FuelNetwork . getInstance ( ) ;
32
30
Original file line number Diff line number Diff line change 7
7
useIsConnected ,
8
8
useWallet as useFuelWallet ,
9
9
} from "@fuels/react" ;
10
+ import { useDisconnect } from "@fuels/react" ;
10
11
11
12
interface ICurrentConnector {
12
13
logo : string ;
@@ -23,6 +24,7 @@ export const useWallet = () => {
23
24
const { connect, isConnecting, isLoading : isLoadingConnectors } = useConnectUI ( ) ;
24
25
const { isConnected, refetch : refetchConnected } = useIsConnected ( ) ;
25
26
const { account, isLoading : isLoadingAccount , isFetching : isFetchingAccount } = useAccount ( ) ;
27
+ const { disconnect } = useDisconnect ( ) ;
26
28
27
29
const address = account ?? "" ;
28
30
@@ -70,6 +72,7 @@ export const useWallet = () => {
70
72
isLoadingConnectors,
71
73
wallet,
72
74
connect,
75
+ disconnect,
73
76
refetchConnected,
74
77
refetchWallet,
75
78
} ;
You can’t perform that action at this time.
0 commit comments