WalletProtobufSerializer: extract wallet constructor reference to WalletFactory::DEFAULT
This makes the default implementation more obvious and easier to
reference. It will also will help us make the WalletFactory member
of WalletAppKit `@Nonnull` in a dependent PR.
@@ -93,13 +93,14 @@ public class WalletProtobufSerializer {
public interface WalletFactory {
Wallet create(NetworkParameters params, KeyChainGroup keyChainGroup);
+ WalletFactory DEFAULT = Wallet::new;
}
private final WalletFactory factory;
private KeyChainFactory keyChainFactory;
public WalletProtobufSerializer() {
- this(Wallet::new);
+ this(WalletFactory.DEFAULT);
}
public WalletProtobufSerializer(WalletFactory factory) {
