diff --git a/web/src/integrationTest/java/de/cotto/lndmanagej/ui/SearchControllerTest.java b/web/src/integrationTest/java/de/cotto/lndmanagej/ui/SearchControllerTest.java index 6dee82b0..e234a599 100644 --- a/web/src/integrationTest/java/de/cotto/lndmanagej/ui/SearchControllerTest.java +++ b/web/src/integrationTest/java/de/cotto/lndmanagej/ui/SearchControllerTest.java @@ -2,9 +2,9 @@ package de.cotto.lndmanagej.ui; import de.cotto.lndmanagej.controller.ChannelIdConverter; import de.cotto.lndmanagej.ui.controller.SearchController; +import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; +import de.cotto.lndmanagej.ui.dto.NodeDto; import de.cotto.lndmanagej.ui.dto.OpenChannelDto; -import de.cotto.lndmanagej.ui.model.NodeDtoFixture; -import de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture; import de.cotto.lndmanagej.ui.page.PageService; import de.cotto.lndmanagej.ui.page.channel.ChannelDetailsPage; import de.cotto.lndmanagej.ui.page.general.ErrorPage; @@ -68,7 +68,7 @@ class SearchControllerTest { private void searchForChannelId(String query) throws Exception { given(this.dataService.getOpenChannels()).willReturn( - List.of(OpenChannelDtoFixture.createFrom(CHAN_DETAILS_DTO)) + List.of(create(CHAN_DETAILS_DTO)) ); given(this.pageService.channelDetails(any())).willReturn(new ChannelDetailsPage(CHAN_DETAILS_DTO)); mockMvc.perform(MockMvcRequestBuilders.get("/search?q=" + query)) @@ -108,7 +108,20 @@ class SearchControllerTest { } private NodesPage nodesPage(OpenChannelDto channel1, OpenChannelDto channel2) { - return new NodesPage(List.of(NodeDtoFixture.createFrom(channel1), NodeDtoFixture.createFrom(channel2))); + return new NodesPage(List.of(create(channel1), create(channel2))); + } + + public static OpenChannelDto create(ChanDetailsDto channelDetails) { + return new OpenChannelDto( + channelDetails.channelId(), + channelDetails.remoteAlias(), + channelDetails.remotePubkey(), + channelDetails.policies(), + channelDetails.balanceInformation()); + } + + public static NodeDto create(OpenChannelDto channel) { + return new NodeDto(channel.remotePubkey().toString(), channel.remoteAlias(), true); } } diff --git a/web/src/test/java/de/cotto/lndmanagej/DemoApplication.java b/web/src/test/java/de/cotto/lndmanagej/DemoApplication.java index c24356b9..0cf83f04 100644 --- a/web/src/test/java/de/cotto/lndmanagej/DemoApplication.java +++ b/web/src/test/java/de/cotto/lndmanagej/DemoApplication.java @@ -1,82 +1,37 @@ package de.cotto.lndmanagej; -import de.cotto.lndmanagej.controller.dto.NodeDetailsDto; -import de.cotto.lndmanagej.model.ChannelId; -import de.cotto.lndmanagej.model.Pubkey; +import de.cotto.lndmanagej.demo.DemoDataService; import de.cotto.lndmanagej.ui.UiDataService; -import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; -import de.cotto.lndmanagej.ui.dto.NodeDto; -import de.cotto.lndmanagej.ui.dto.OpenChannelDto; -import de.cotto.lndmanagej.ui.dto.StatusModel; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.EnableAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; import org.springframework.boot.autoconfigure.jdbc.DataSourceTransactionManagerAutoConfiguration; import org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration; +import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.Configuration; -import org.springframework.stereotype.Component; -import java.util.List; - -import static de.cotto.lndmanagej.MockUtil.createChannelDetails; -import static de.cotto.lndmanagej.MockUtil.createNodeDetails; -import static de.cotto.lndmanagej.MockUtil.createOpenChannels; -import static de.cotto.lndmanagej.MockUtil.getStatusModel; -@SuppressWarnings("CPD-START") @Configuration @EnableAutoConfiguration( exclude = { - DataSourceAutoConfiguration.class, - DataSourceTransactionManagerAutoConfiguration.class, - HibernateJpaAutoConfiguration.class + DataSourceAutoConfiguration.class, + DataSourceTransactionManagerAutoConfiguration.class, + HibernateJpaAutoConfiguration.class } ) -@ComponentScan("de.cotto.lndmanagej.ui") +@ComponentScan(basePackages = {"de.cotto.lndmanagej.ui"}) public class DemoApplication { + public DemoApplication() { + // to satisfy pmd + } + + @Bean + public UiDataService demoData() { + return new DemoDataService(); + } + public static void main(String[] arguments) { SpringApplication.run(DemoApplication.class, arguments); } - - @Component - public static class DataServiceMock extends UiDataService { - - @Override - public StatusModel getStatus() { - return getStatusModel(); - } - - @Override - public List getOpenChannels() { - return createOpenChannels(); - } - - @Override - public ChanDetailsDto getChannelDetails(ChannelId channelId) { - OpenChannelDto localOpenChannel = getOpenChannels().stream() - .filter(c -> c.channelId().equals(channelId)) - .findFirst() - .orElseThrow(); - return createChannelDetails(localOpenChannel); - } - - @Override - public NodeDto getNode(Pubkey pubkey) { - return getOpenChannels().stream() - .filter(channel -> channel.remotePubkey().equals(pubkey)) - .map(channel -> new NodeDto(pubkey.toString(), channel.remoteAlias(), isOnline(channel))) - .findFirst().orElseThrow(); - } - - @Override - public NodeDetailsDto getNodeDetails(Pubkey pubkey) { - return createNodeDetails(getNode(pubkey)); - } - - } - - private static boolean isOnline(OpenChannelDto channel) { - return channel.channelId().getShortChannelId() % 2 != 0; - } } \ No newline at end of file diff --git a/web/src/test/java/de/cotto/lndmanagej/MockUtil.java b/web/src/test/java/de/cotto/lndmanagej/MockUtil.java deleted file mode 100644 index 38c69908..00000000 --- a/web/src/test/java/de/cotto/lndmanagej/MockUtil.java +++ /dev/null @@ -1,106 +0,0 @@ -package de.cotto.lndmanagej; - -import de.cotto.lndmanagej.controller.dto.BalanceInformationDto; -import de.cotto.lndmanagej.controller.dto.ChannelWithWarningsDto; -import de.cotto.lndmanagej.controller.dto.FeeReportDto; -import de.cotto.lndmanagej.controller.dto.FlowReportDto; -import de.cotto.lndmanagej.controller.dto.NodeDetailsDto; -import de.cotto.lndmanagej.controller.dto.NodeWithWarningsDto; -import de.cotto.lndmanagej.controller.dto.NodesAndChannelsWithWarningsDto; -import de.cotto.lndmanagej.controller.dto.OnChainCostsDto; -import de.cotto.lndmanagej.controller.dto.OnlineReportDto; -import de.cotto.lndmanagej.controller.dto.RebalanceReportDto; -import de.cotto.lndmanagej.model.ChannelIdFixtures; -import de.cotto.lndmanagej.model.FeeReportFixtures; -import de.cotto.lndmanagej.model.FlowReportFixtures; -import de.cotto.lndmanagej.model.OnlineReport; -import de.cotto.lndmanagej.model.OnlineReportFixtures; -import de.cotto.lndmanagej.model.OpenInitiator; -import de.cotto.lndmanagej.model.Pubkey; -import de.cotto.lndmanagej.model.RebalanceReportFixtures; -import de.cotto.lndmanagej.model.warnings.ChannelWarningsFixtures; -import de.cotto.lndmanagej.model.warnings.NodeWarningsFixtures; -import de.cotto.lndmanagej.model.warnings.Warning; -import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; -import de.cotto.lndmanagej.ui.dto.NodeDto; -import de.cotto.lndmanagej.ui.dto.OpenChannelDto; -import de.cotto.lndmanagej.ui.dto.StatusModel; - -import java.util.List; -import java.util.stream.Collectors; - -import static de.cotto.lndmanagej.model.BalanceInformationFixtures.BALANCE_INFORMATION; -import static de.cotto.lndmanagej.model.OnChainCostsFixtures.ON_CHAIN_COSTS; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.ACINQ; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.ACINQ2; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.BCASH; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.COTTO; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.OPEN_CHANNEL_DTO; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.WOS; -import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.WOS2; - -public final class MockUtil { - - private MockUtil() { - // util class - } - - public static StatusModel getStatusModel() { - return new StatusModel(true, 735_642, createNodeWarnings()); - } - - - public static List createOpenChannels() { - return List.of(OPEN_CHANNEL_DTO, ACINQ, ACINQ2, WOS, WOS2, BCASH, COTTO); - } - - public static NodesAndChannelsWithWarningsDto createNodeWarnings() { - return new NodesAndChannelsWithWarningsDto( - List.of(new NodeWithWarningsDto(NodeWarningsFixtures.NODE_WARNINGS.warnings().stream() - .map(Warning::description) - .collect(Collectors.toSet()), WOS.remoteAlias(), WOS.remotePubkey()), - new NodeWithWarningsDto(NodeWarningsFixtures.NODE_WARNINGS.warnings().stream() - .map(Warning::description) - .collect(Collectors.toSet()), ACINQ.remoteAlias(), ACINQ.remotePubkey()) - ), - List.of(new ChannelWithWarningsDto(ChannelWarningsFixtures.CHANNEL_WARNINGS.warnings().stream() - .map(Warning::description) - .collect(Collectors.toSet()), WOS.channelId()) - ) - ); - } - - public static ChanDetailsDto createChannelDetails(OpenChannelDto channel) { - return new ChanDetailsDto( - channel.channelId(), - channel.remotePubkey(), - channel.remoteAlias(), - OpenInitiator.REMOTE, - channel.balanceInformation(), - OnChainCostsDto.createFromModel(ON_CHAIN_COSTS), - channel.policies(), - FeeReportDto.createFromModel(FeeReportFixtures.FEE_REPORT), - FlowReportDto.createFromModel(FlowReportFixtures.FLOW_REPORT), - RebalanceReportDto.createFromModel(RebalanceReportFixtures.REBALANCE_REPORT), - ChannelWarningsFixtures.CHANNEL_WARNINGS.descriptions()); - } - - public static NodeDetailsDto createNodeDetails(NodeDto node) { - OnlineReport onlineReport = node.online() - ? OnlineReportFixtures.ONLINE_REPORT : OnlineReportFixtures.ONLINE_REPORT_OFFLINE; - return new NodeDetailsDto( - Pubkey.create(node.pubkey()), - node.alias(), - List.of(ChannelIdFixtures.CHANNEL_ID), - List.of(ChannelIdFixtures.CHANNEL_ID_2), - List.of(), - List.of(), - OnChainCostsDto.createFromModel(ON_CHAIN_COSTS), - BalanceInformationDto.createFromModel(BALANCE_INFORMATION), - OnlineReportDto.createFromModel(onlineReport), - FeeReportDto.createFromModel(FeeReportFixtures.FEE_REPORT), - FlowReportDto.createFromModel(FlowReportFixtures.FLOW_REPORT), - RebalanceReportDto.createFromModel(RebalanceReportFixtures.REBALANCE_REPORT), - ChannelWarningsFixtures.CHANNEL_WARNINGS.descriptions()); - } -} diff --git a/web/src/test/java/de/cotto/lndmanagej/demo/DemoDataService.java b/web/src/test/java/de/cotto/lndmanagej/demo/DemoDataService.java new file mode 100644 index 00000000..0afab226 --- /dev/null +++ b/web/src/test/java/de/cotto/lndmanagej/demo/DemoDataService.java @@ -0,0 +1,69 @@ +package de.cotto.lndmanagej.demo; + +import de.cotto.lndmanagej.controller.dto.NodeDetailsDto; +import de.cotto.lndmanagej.model.ChannelId; +import de.cotto.lndmanagej.model.Pubkey; +import de.cotto.lndmanagej.ui.UiDataService; +import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; +import de.cotto.lndmanagej.ui.dto.NodeDto; +import de.cotto.lndmanagej.ui.dto.OpenChannelDto; +import de.cotto.lndmanagej.ui.dto.StatusModel; + +import java.util.List; + +import static de.cotto.lndmanagej.demo.utils.ChannelDetailsUtil.createChannelDetails; +import static de.cotto.lndmanagej.demo.utils.NodeDetailsUtil.createNodeDetails; +import static de.cotto.lndmanagej.demo.utils.NodeWarningsUtil.getStatusModel; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.ACINQ; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.ACINQ2; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.BCASH; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.COTTO; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.OPEN_CHANNEL_DTO; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.WOS; +import static de.cotto.lndmanagej.ui.model.OpenChannelDtoFixture.WOS2; + +public class DemoDataService extends UiDataService { + + public DemoDataService() { + super(); + } + + @Override + public StatusModel getStatus() { + return getStatusModel(); + } + + @Override + public List getOpenChannels() { + return List.of(OPEN_CHANNEL_DTO, ACINQ, ACINQ2, WOS, WOS2, BCASH, COTTO); + } + + @Override + public ChanDetailsDto getChannelDetails(ChannelId channelId) { + OpenChannelDto localOpenChannel = getOpenChannels().stream() + .filter(c -> c.channelId().equals(channelId)) + .findFirst() + .orElseThrow(); + return createChannelDetails(localOpenChannel); + } + + @Override + public NodeDto getNode(Pubkey pubkey) { + return getOpenChannels().stream() + .filter(channel -> channel.remotePubkey().equals(pubkey)) + .map(channel -> new NodeDto(pubkey.toString(), channel.remoteAlias(), isOnline(channel))) + .findFirst().orElseThrow(); + } + + @Override + public NodeDetailsDto getNodeDetails(Pubkey pubkey) { + return createNodeDetails(getNode(pubkey)); + } + + private static boolean isOnline(OpenChannelDto channel) { + return channel.channelId().getShortChannelId() % 2 != 0; + } + +} + + diff --git a/web/src/test/java/de/cotto/lndmanagej/demo/utils/ChannelDetailsUtil.java b/web/src/test/java/de/cotto/lndmanagej/demo/utils/ChannelDetailsUtil.java new file mode 100644 index 00000000..8c2489c4 --- /dev/null +++ b/web/src/test/java/de/cotto/lndmanagej/demo/utils/ChannelDetailsUtil.java @@ -0,0 +1,39 @@ +package de.cotto.lndmanagej.demo.utils; + +import de.cotto.lndmanagej.controller.dto.FeeReportDto; +import de.cotto.lndmanagej.controller.dto.FlowReportDto; +import de.cotto.lndmanagej.controller.dto.OnChainCostsDto; +import de.cotto.lndmanagej.controller.dto.RebalanceReportDto; +import de.cotto.lndmanagej.model.FeeReportFixtures; +import de.cotto.lndmanagej.model.FlowReportFixtures; +import de.cotto.lndmanagej.model.OpenInitiator; +import de.cotto.lndmanagej.model.RebalanceReportFixtures; +import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; +import de.cotto.lndmanagej.ui.dto.OpenChannelDto; + +import java.util.Set; + +import static de.cotto.lndmanagej.model.OnChainCostsFixtures.ON_CHAIN_COSTS; + +public final class ChannelDetailsUtil { + + private ChannelDetailsUtil() { + // util class + } + + public static ChanDetailsDto createChannelDetails(OpenChannelDto channel) { + return new ChanDetailsDto( + channel.channelId(), + channel.remotePubkey(), + channel.remoteAlias(), + OpenInitiator.REMOTE, + channel.balanceInformation(), + OnChainCostsDto.createFromModel(ON_CHAIN_COSTS), + channel.policies(), + FeeReportDto.createFromModel(FeeReportFixtures.FEE_REPORT), + FlowReportDto.createFromModel(FlowReportFixtures.FLOW_REPORT), + RebalanceReportDto.createFromModel(RebalanceReportFixtures.REBALANCE_REPORT), + Set.of("Something is wrong with this channel.")); + } + +} diff --git a/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeDetailsUtil.java b/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeDetailsUtil.java new file mode 100644 index 00000000..86991eee --- /dev/null +++ b/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeDetailsUtil.java @@ -0,0 +1,49 @@ +package de.cotto.lndmanagej.demo.utils; + +import de.cotto.lndmanagej.controller.dto.BalanceInformationDto; +import de.cotto.lndmanagej.controller.dto.FeeReportDto; +import de.cotto.lndmanagej.controller.dto.FlowReportDto; +import de.cotto.lndmanagej.controller.dto.NodeDetailsDto; +import de.cotto.lndmanagej.controller.dto.OnChainCostsDto; +import de.cotto.lndmanagej.controller.dto.OnlineReportDto; +import de.cotto.lndmanagej.controller.dto.RebalanceReportDto; +import de.cotto.lndmanagej.model.ChannelId; +import de.cotto.lndmanagej.model.FeeReportFixtures; +import de.cotto.lndmanagej.model.FlowReportFixtures; +import de.cotto.lndmanagej.model.OnlineReport; +import de.cotto.lndmanagej.model.OnlineReportFixtures; +import de.cotto.lndmanagej.model.Pubkey; +import de.cotto.lndmanagej.model.RebalanceReportFixtures; +import de.cotto.lndmanagej.ui.dto.NodeDto; + +import java.util.List; +import java.util.Set; + +import static de.cotto.lndmanagej.model.BalanceInformationFixtures.BALANCE_INFORMATION; +import static de.cotto.lndmanagej.model.OnChainCostsFixtures.ON_CHAIN_COSTS; + +public final class NodeDetailsUtil { + + private NodeDetailsUtil() { + // util class + } + + public static NodeDetailsDto createNodeDetails(NodeDto node) { + OnlineReport onlineReport = node.online() + ? OnlineReportFixtures.ONLINE_REPORT : OnlineReportFixtures.ONLINE_REPORT_OFFLINE; + return new NodeDetailsDto( + Pubkey.create(node.pubkey()), + node.alias(), + List.of(ChannelId.fromCompactForm("712345x123x1")), + List.of(ChannelId.fromCompactForm("712345x123x1")), + List.of(), + List.of(), + OnChainCostsDto.createFromModel(ON_CHAIN_COSTS), + BalanceInformationDto.createFromModel(BALANCE_INFORMATION), + OnlineReportDto.createFromModel(onlineReport), + FeeReportDto.createFromModel(FeeReportFixtures.FEE_REPORT), + FlowReportDto.createFromModel(FlowReportFixtures.FLOW_REPORT), + RebalanceReportDto.createFromModel(RebalanceReportFixtures.REBALANCE_REPORT), + Set.of("Something is wrong with this node.")); + } +} diff --git a/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeWarningsUtil.java b/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeWarningsUtil.java new file mode 100644 index 00000000..084f28dd --- /dev/null +++ b/web/src/test/java/de/cotto/lndmanagej/demo/utils/NodeWarningsUtil.java @@ -0,0 +1,42 @@ +package de.cotto.lndmanagej.demo.utils; + +import de.cotto.lndmanagej.controller.dto.ChannelWithWarningsDto; +import de.cotto.lndmanagej.controller.dto.NodeWithWarningsDto; +import de.cotto.lndmanagej.controller.dto.NodesAndChannelsWithWarningsDto; +import de.cotto.lndmanagej.model.PubkeyFixtures; +import de.cotto.lndmanagej.model.warnings.ChannelWarningsFixtures; +import de.cotto.lndmanagej.model.warnings.NodeWarningsFixtures; +import de.cotto.lndmanagej.model.warnings.Warning; +import de.cotto.lndmanagej.ui.dto.StatusModel; + +import java.util.List; +import java.util.stream.Collectors; + +import static de.cotto.lndmanagej.model.ChannelIdFixtures.CHANNEL_ID_3; + +public final class NodeWarningsUtil { + + private NodeWarningsUtil() { + // util class + } + + public static StatusModel getStatusModel() { + return new StatusModel(true, 735_642, createNodeWarnings()); + } + + public static NodesAndChannelsWithWarningsDto createNodeWarnings() { + return new NodesAndChannelsWithWarningsDto( + List.of(new NodeWithWarningsDto(NodeWarningsFixtures.NODE_WARNINGS.warnings().stream() + .map(Warning::description) + .collect(Collectors.toSet()), "WalletOfSatoshi", PubkeyFixtures.PUBKEY), + new NodeWithWarningsDto(NodeWarningsFixtures.NODE_WARNINGS.warnings().stream() + .map(Warning::description) + .collect(Collectors.toSet()), "Albert", PubkeyFixtures.PUBKEY) + ), + List.of(new ChannelWithWarningsDto(ChannelWarningsFixtures.CHANNEL_WARNINGS.warnings().stream() + .map(Warning::description) + .collect(Collectors.toSet()), CHANNEL_ID_3) + ) + ); + } +} diff --git a/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/NodeDtoFixture.java b/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/NodeDtoFixture.java deleted file mode 100644 index f2cdd02d..00000000 --- a/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/NodeDtoFixture.java +++ /dev/null @@ -1,16 +0,0 @@ -package de.cotto.lndmanagej.ui.model; - -import de.cotto.lndmanagej.controller.dto.NodeDetailsDto; -import de.cotto.lndmanagej.ui.dto.NodeDto; -import de.cotto.lndmanagej.ui.dto.OpenChannelDto; - -public class NodeDtoFixture { - - public static NodeDto createFrom(NodeDetailsDto details) { - return new NodeDto(details.node().toString(), details.alias(), details.onlineReport().online()); - } - - public static NodeDto createFrom(OpenChannelDto channel) { - return new NodeDto(channel.remotePubkey().toString(), channel.remoteAlias(), true); - } -} diff --git a/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/OpenChannelDtoFixture.java b/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/OpenChannelDtoFixture.java index c8727c96..9593dfc2 100644 --- a/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/OpenChannelDtoFixture.java +++ b/web/src/testFixtures/java/de/cotto/lndmanagej/ui/model/OpenChannelDtoFixture.java @@ -8,7 +8,6 @@ import de.cotto.lndmanagej.model.ChannelIdFixtures; import de.cotto.lndmanagej.model.Coins; import de.cotto.lndmanagej.model.Pubkey; import de.cotto.lndmanagej.model.PubkeyFixtures; -import de.cotto.lndmanagej.ui.dto.ChanDetailsDto; import de.cotto.lndmanagej.ui.dto.OpenChannelDto; import static de.cotto.lndmanagej.model.BalanceInformationFixtures.BALANCE_INFORMATION; @@ -96,13 +95,4 @@ public class OpenChannelDtoFixture { Coins.ofSatoshis(MILLION * 10), Coins.ofSatoshis(500) ))); - - public static OpenChannelDto createFrom(ChanDetailsDto channelDetails) { - return new OpenChannelDto( - channelDetails.channelId(), - channelDetails.remoteAlias(), - channelDetails.remotePubkey(), - channelDetails.policies(), - channelDetails.balanceInformation()); - } }