{selectedPeer &&
- (selectedPeer.paymentMethod === "lightning" ||
- (order.paymentMethod === "onchain" &&
- selectedPeer.pubkey === order.pubkey)) && (
+ order.paymentMethod === "onchain" &&
+ selectedPeer.pubkey === order.pubkey && (
)}
- {order.paymentMethod === "lightning" && (
-
- )}
;
- setOrder(order: Partial): void;
-};
-
-function NewChannelLightning(props: NewChannelLightningProps) {
- if (props.order.paymentMethod !== "lightning") {
- throw new Error("unexpected payment method");
- }
- return null;
-}
-
type NewChannelOnchainProps = {
order: Partial;
setOrder: React.Dispatch>>;