|
16 | 16 | import static org.tron.common.utils.Utils.inputPassword; |
17 | 17 | import static org.tron.common.utils.Utils.isValid; |
18 | 18 | import static org.tron.common.utils.Utils.redBoldHighlight; |
| 19 | +import static org.tron.common.utils.Utils.yellowBoldHighlight; |
19 | 20 | import static org.tron.gasfree.GasFreeApi.concat; |
20 | 21 | import static org.tron.gasfree.GasFreeApi.gasFreeSubmit; |
21 | 22 | import static org.tron.gasfree.GasFreeApi.getDomainSeparator; |
|
44 | 45 | import com.typesafe.config.Config; |
45 | 46 | import java.io.File; |
46 | 47 | import java.io.IOException; |
47 | | -import java.math.BigInteger; |
48 | 48 | import java.security.InvalidKeyException; |
49 | 49 | import java.security.NoSuchAlgorithmException; |
50 | 50 | import java.util.ArrayList; |
|
71 | 71 | import org.jline.terminal.TerminalBuilder; |
72 | 72 | import org.tron.common.enums.NetType; |
73 | 73 | import org.tron.common.utils.AbiUtil; |
74 | | -import org.tron.common.utils.ByteArray; |
75 | | -import org.tron.common.utils.ByteUtil; |
76 | 74 | import org.tron.common.utils.Utils; |
77 | 75 | import org.tron.core.config.Configuration; |
78 | 76 | import org.tron.core.exception.CancelException; |
@@ -1569,7 +1567,7 @@ private Pair<ApiClient, NetType> getApiClientAndNetType(String netWorkSymbol, St |
1569 | 1567 | if (isEmpty(fullNode) && !isEmpty(solidityNode)) { |
1570 | 1568 | fullNode = solidityNode; |
1571 | 1569 | isFullnodeEmpty = true; |
1572 | | - System.out.println("If only soliditynode.ip.list is configured, transactions and other operations will not be available."); |
| 1570 | + System.out.println(yellowBoldHighlight("If only soliditynode.ip.list is configured, transactions and other operations will not be available.")); |
1573 | 1571 | } else if (!isEmpty(fullNode) && isEmpty(solidityNode)) { |
1574 | 1572 | solidityNode = fullNode; |
1575 | 1573 | isSoliditynodeEmpty = true; |
@@ -1619,7 +1617,7 @@ private Pair<ApiClient, NetType> getApiClientAndNetType(String netWorkSymbol, St |
1619 | 1617 | if (isEmpty(fullNode) && !isEmpty(solidityNode)) { |
1620 | 1618 | fullNode = solidityNode; |
1621 | 1619 | isFullnodeEmpty = true; |
1622 | | - System.out.println("If only soliditynode.ip.list is configured, transactions and other operations will not be available."); |
| 1620 | + System.out.println(yellowBoldHighlight("If only soliditynode.ip.list is configured, transactions and other operations will not be available.")); |
1623 | 1621 | } else if (!isEmpty(fullNode) && isEmpty(solidityNode)) { |
1624 | 1622 | solidityNode = fullNode; |
1625 | 1623 | isSoliditynodeEmpty = true; |
@@ -1754,6 +1752,10 @@ private Pair<ApiClient, NetType> getApiClientAndNetType(String netWorkSymbol, St |
1754 | 1752 | // } |
1755 | 1753 |
|
1756 | 1754 | public boolean getGasFreeInfo(String address) throws Exception { |
| 1755 | + if (wallet == null || !wallet.isLoginState()) { |
| 1756 | + System.out.println("Warning: getGasFreeInfo " + failedHighlight() + ", Please login first !!"); |
| 1757 | + return false; |
| 1758 | + } |
1757 | 1759 | if (WalletApi.getCurrentNetwork() != MAIN && WalletApi.getCurrentNetwork() != NILE) { |
1758 | 1760 | System.out.println(GAS_FREE_SUPPORT_NETWORK_TIP); |
1759 | 1761 | return false; |
|
0 commit comments