Skip to content

Commit

Permalink
Fix LN
Browse files Browse the repository at this point in the history
  • Loading branch information
22388o committed Dec 9, 2024
1 parent 518717a commit 9ca3bd4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 5 additions & 1 deletion lib/lightning/lightning.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
import 'package:ldk_node/ldk_node.dart';

import '../dlc/contract.dart';
import '../dlc/oracle.dart';
import 'taproot_channel.dart';
class DLC {
final OracleClient oracle;
final Oracle oracle
final Oracle oracle;
final Channel channel;
final Contract contract;

Expand Down
4 changes: 2 additions & 2 deletions lib/lightning/taproot_channel.dart
Original file line number Diff line number Diff line change
Expand Up @@ -56,14 +56,14 @@ class DLC {
final outcome = channel.determineOutcome();

// Create a settlement transaction based on the outcome
final settlementTx = await channel.createSettlementTransaction(outcome);
final settlementTx = await channel.createSettlementTransaction(outcome as int);

// Sign and broadcast the settlement transaction
final signedTx = await channel.signTransaction(settlementTx);
await channel.broadcastTransaction(signedTx);

// Distribute the funds as per the contract terms
await channel.distributeFunds(outcome);
await channel.distributeFunds(outcome as int);

print("Contract executed and funds distributed based on outcome.");
} catch (e) {
Expand Down

0 comments on commit 9ca3bd4

Please sign in to comment.