File tree Expand file tree Collapse file tree 2 files changed +6
-0
lines changed
Expand file tree Collapse file tree 2 files changed +6
-0
lines changed Original file line number Diff line number Diff line change 11package org .tron .ledger .listener ;
22
33import static org .tron .common .utils .TransactionUtils .getTransactionId ;
4+ import static org .tron .common .utils .Utils .greenBoldHighlight ;
45import static org .tron .ledger .console .ConsoleColor .ANSI_RED ;
56import static org .tron .ledger .console .ConsoleColor .ANSI_RESET ;
67import static org .tron .ledger .console .ConsoleColor .ANSI_YELLOW ;
@@ -209,6 +210,7 @@ public void hidDataReceived(HidServicesEvent event) {
209210 doLedgerSignEnd ();
210211 }
211212 }
213+ System .out .println (greenBoldHighlight ("Enter" ) + " to continue..." );
212214 }
213215
214216 private void doLedgerSignEnd () {
Original file line number Diff line number Diff line change @@ -810,6 +810,10 @@ private Transaction signTransaction(Transaction transaction)
810810 return transaction ;
811811 }
812812 HidDevice hidDevice = HidServicesWrapper .getInstance ().getHidDevice (wf .getAddress (), getPath ());
813+ if (hidDevice == null ) {
814+ TransactionSignManager .getInstance ().setTransaction (null );
815+ return null ;
816+ }
813817 Optional <String > state = LedgerSignResult .getLastTransactionState (hidDevice .getPath ());
814818 boolean confirmed = state .isPresent () && LedgerSignResult .SIGN_RESULT_SUCCESS .equals (state .get ());
815819 if (weight .getResult ().getCode () == response_code .NOT_ENOUGH_PERMISSION && confirmed ) {
You can’t perform that action at this time.
0 commit comments