|
20 | 20 | import static org.tron.common.utils.Utils.inputPassword; |
21 | 21 | import static org.tron.common.utils.Utils.redBoldHighlight; |
22 | 22 | import static org.tron.common.utils.Utils.yellowBoldHighlight; |
23 | | -import static org.tron.core.config.Parameter.CommonConstant.ADD_PRE_FIX_BYTE_MAINNET; |
24 | | -import static org.tron.core.config.Parameter.CommonConstant.ADD_PRE_FIX_BYTE_TESTNET; |
| 23 | +import static org.tron.core.config.Parameter.CommonConstant.ADD_PRE_FIX_BYTE_DEFAULT; |
25 | 24 | import static org.tron.keystore.StringUtils.char2Byte; |
26 | 25 | import static org.tron.keystore.Wallet.decrypt2PrivateBytes; |
27 | 26 | import static org.tron.multi.MultiSignService.CONTRACT_TYPE_SET; |
@@ -162,7 +161,7 @@ public class WalletApi { |
162 | 161 | private List<WalletFile> walletFile = new ArrayList<>(); |
163 | 162 | private boolean loginState = false; |
164 | 163 | private byte[] address; |
165 | | - private static byte addressPreFixByte = ADD_PRE_FIX_BYTE_TESTNET; |
| 164 | + private static byte addressPreFixByte = ADD_PRE_FIX_BYTE_DEFAULT; |
166 | 165 | private static int rpcVersion = 0; |
167 | 166 | private static boolean lockAccount; |
168 | 167 | private static boolean isEckey = true; |
@@ -271,11 +270,9 @@ public static ApiClient initApiCli() { |
271 | 270 | solidityNode = fullNode; |
272 | 271 | isSoliditynodeEmpty = true; |
273 | 272 | } |
274 | | - if (config.hasPath("net.type") && "mainnet".equalsIgnoreCase(config.getString("net.type"))) { |
275 | | - WalletApi.setAddressPreFixByte(ADD_PRE_FIX_BYTE_MAINNET); |
276 | | - } else { |
277 | | - WalletApi.setAddressPreFixByte(ADD_PRE_FIX_BYTE_TESTNET); |
278 | | - } |
| 273 | + |
| 274 | + WalletApi.setAddressPreFixByte(ADD_PRE_FIX_BYTE_DEFAULT); |
| 275 | + |
279 | 276 | if (config.hasPath("crypto.engine")) { |
280 | 277 | isEckey = config.getString("crypto.engine").equalsIgnoreCase("eckey"); |
281 | 278 | } |
|
0 commit comments