Skip to content

Commit a47c377

Browse files
committed
fix: Update rpc urls for mainnet
1 parent 72c3bc5 commit a47c377

File tree

1 file changed

+30
-27
lines changed

1 file changed

+30
-27
lines changed

logic/lib/src/domain/entities/network.dart

Lines changed: 30 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import 'dart:convert';
22

3-
43
import 'entities.dart';
54

65
enum NetworkType { testnet, mainnet, custom }
@@ -14,7 +13,9 @@ class Network {
1413
}
1514

1615
factory Network.fromAddEthereumChain(
17-
AddEthereumChain addEthereumChain, int chainId,) {
16+
AddEthereumChain addEthereumChain,
17+
int chainId,
18+
) {
1819
String logo = addEthereumChain.iconUrls?.isNotEmpty ?? false
1920
? addEthereumChain.iconUrls![0]
2021
: 'assets/svg/networks/unknown.svg';
@@ -84,30 +85,32 @@ class Network {
8485
final bool isAdded;
8586
final NetworkType networkType;
8687

87-
Network copyWith(
88-
{String? logo,
89-
String? web3RpcHttpUrl,
90-
String? web3RpcWebsocketUrl,
91-
String? web3WebSocketUrl,
92-
String? symbol,
93-
String? explorerUrl,
94-
bool? enabled,
95-
String? label,
96-
int? chainId,
97-
bool? isAdded,
98-
NetworkType? networkType,}) {
88+
Network copyWith({
89+
String? logo,
90+
String? web3RpcHttpUrl,
91+
String? web3RpcWebsocketUrl,
92+
String? web3WebSocketUrl,
93+
String? symbol,
94+
String? explorerUrl,
95+
bool? enabled,
96+
String? label,
97+
int? chainId,
98+
bool? isAdded,
99+
NetworkType? networkType,
100+
}) {
99101
return Network(
100-
logo: logo ?? this.logo,
101-
web3RpcHttpUrl: web3RpcHttpUrl ?? this.web3RpcHttpUrl,
102-
web3RpcWebsocketUrl: web3RpcWebsocketUrl ?? this.web3RpcWebsocketUrl,
103-
web3WebSocketUrl: web3WebSocketUrl ?? this.web3WebSocketUrl,
104-
symbol: symbol ?? this.symbol,
105-
explorerUrl: explorerUrl ?? this.explorerUrl,
106-
enabled: enabled ?? this.enabled,
107-
label: label ?? this.label,
108-
chainId: chainId ?? this.chainId,
109-
isAdded: isAdded ?? this.isAdded,
110-
networkType: networkType ?? this.networkType,);
102+
logo: logo ?? this.logo,
103+
web3RpcHttpUrl: web3RpcHttpUrl ?? this.web3RpcHttpUrl,
104+
web3RpcWebsocketUrl: web3RpcWebsocketUrl ?? this.web3RpcWebsocketUrl,
105+
web3WebSocketUrl: web3WebSocketUrl ?? this.web3WebSocketUrl,
106+
symbol: symbol ?? this.symbol,
107+
explorerUrl: explorerUrl ?? this.explorerUrl,
108+
enabled: enabled ?? this.enabled,
109+
label: label ?? this.label,
110+
chainId: chainId ?? this.chainId,
111+
isAdded: isAdded ?? this.isAdded,
112+
networkType: networkType ?? this.networkType,
113+
);
111114
}
112115

113116
Map<String, dynamic> toMap() => {
@@ -200,8 +203,8 @@ class Network {
200203
),
201204
const Network(
202205
logo: 'assets/svg/networks/moonchain.svg',
203-
web3RpcHttpUrl: 'https://rpc.mxc.com',
204-
web3RpcWebsocketUrl: 'wss://rpc.mxc.com',
206+
web3RpcHttpUrl: 'https://rpc.moonchain.com',
207+
web3RpcWebsocketUrl: 'wss://rpc.moonchain.com',
205208
web3WebSocketUrl:
206209
'wss://explorer-v1.mxc.com/socket/v2/websocket?vsn=2.0.0',
207210
symbol: 'MXC',

0 commit comments

Comments
 (0)