File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed
src/main/java/com/radynamics/dallipay Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 20
20
import java .time .LocalDateTime ;
21
21
import java .time .ZoneId ;
22
22
import java .time .format .DateTimeFormatter ;
23
+ import java .util .Arrays ;
23
24
import java .util .Collections ;
24
25
import java .util .Optional ;
25
26
@@ -80,7 +81,8 @@ public static void main(String[] args) {
80
81
var transformInstruction = TransformInstructionFactory .create (ledger , configFilePath , networkId );
81
82
if (ledger .getNetwork () != null && !networkAvailable (ledger )) {
82
83
log .warn ("No connection could be established to %s." .formatted (ledger .getNetwork ().getUrl ()));
83
- transformInstruction .setNetwork (null );
84
+ // Fallback to first default network (eg. XRPL) or null if there aren't any (eg. Bitcoin).
85
+ transformInstruction .setNetwork (Arrays .stream (ledger .getDefaultNetworkInfo ()).findFirst ().orElse (null ));
84
86
}
85
87
86
88
var frm = new MainForm (!existsDb );
You can’t perform that action at this time.
0 commit comments