|
71 | 71 | import org.tron.api.GrpcAPI.TransactionSignWeight; |
72 | 72 | import org.tron.common.crypto.Hash; |
73 | 73 | import org.tron.common.crypto.Sha256Sm3Hash; |
| 74 | +import org.tron.common.enums.NetType; |
74 | 75 | import org.tron.core.dao.Tx; |
75 | 76 | import org.tron.keystore.StringUtils; |
76 | 77 | import org.tron.keystore.WalletFile; |
@@ -131,7 +132,7 @@ public class Utils { |
131 | 132 |
|
132 | 133 | public static final int MIN_LENGTH = 2; |
133 | 134 | public static final int MAX_LENGTH = 14; |
134 | | - public static final String VERSION = " v4.9.1"; |
| 135 | + public static final String VERSION = " v4.9.2"; |
135 | 136 | public static final String TRANSFER_METHOD_ID = "a9059cbb"; |
136 | 137 |
|
137 | 138 | private static SecureRandom random = new SecureRandom(); |
@@ -610,7 +611,11 @@ public static Tx getTx(Chain.Transaction transaction) { |
610 | 611 | tx.setType(contract.getType().name()); |
611 | 612 | tx.setFrom(encode58Check(triggerSmartContract.getOwnerAddress().toByteArray())); |
612 | 613 | tx.setTo(encode58Check(triggerSmartContract.getContractAddress().toByteArray())); |
613 | | -// setTransferParams(tx, triggerSmartContract); |
| 614 | + NetType netType = WalletApi.getCurrentNetwork(); |
| 615 | + if (netType.getUsdtAddress().equals(encode58Check(triggerSmartContract.getContractAddress().toByteArray()))) { |
| 616 | + setTransferParams(tx, triggerSmartContract); |
| 617 | + tx.setType(contract.getType().name() + "(transferUSDT)"); |
| 618 | + } |
614 | 619 | break; |
615 | 620 | case UpdateSettingContract: |
616 | 621 | UpdateSettingContract updateSettingContract = |
@@ -1179,6 +1184,10 @@ public static String greenBoldHighlight(int i) { |
1179 | 1184 | return ANSI_BOLD + ANSI_GREEN + i + ANSI_RESET; |
1180 | 1185 | } |
1181 | 1186 |
|
| 1187 | + public static String greenBoldHighlight(long i) { |
| 1188 | + return ANSI_BOLD + ANSI_GREEN + i + ANSI_RESET; |
| 1189 | + } |
| 1190 | + |
1182 | 1191 | public static String blueBoldHighlight(String str) { |
1183 | 1192 | return ANSI_BOLD + ANSI_BLUE + str + ANSI_RESET; |
1184 | 1193 | } |
|
0 commit comments