-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PoC using DLC-Channels from rust-dlc#master #1788
Conversation
e3294ac
to
7a74d92
Compare
@@ -549,7 +547,9 @@ impl Node { | |||
let action = if position_contracts + trade_contracts == Decimal::ZERO { | |||
TradeAction::Close(subchannel.channel_id) | |||
} else { | |||
TradeAction::Resize(subchannel.channel_id) | |||
// TODO(bonomat) implement channel resize on dlc-channels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
None => 1.0, | ||
}; | ||
fn coordinator_leverage_for_trade(&self, _counterparty_peer_id: &PublicKey) -> Result<f32> { | ||
// TODO(bonomat): we will need to configure the leverage on the coordinator differently now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
.propose_dlc_channel(channel_details.clone(), contract_input) | ||
.await | ||
if let Err(e) = | ||
// TODO(bonomat): we will need to use the new dlc channel protocol here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -278,6 +274,29 @@ impl<S: TenTenOneStorage, N: Storage> dlc_manager::Wallet for LnDlcWallet<S, N> | |||
_: Option<u64>, | |||
lock_utxos: bool, | |||
) -> Result<Vec<Utxo>, Error> { | |||
// TODO(bonomat): this should not be necessary to store it in the db and then load again |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let (node_id, reject) = self | ||
.sub_channel_manager | ||
.reject_sub_channel_offer(*channel_id)?; | ||
// TODO: implement reject dlc channel offer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (margin.sats < minTradeMargin.sats) { | ||
return "Min margin is ${minTradeMargin.sats}"; | ||
} | ||
// TODO(bonomat): we need new checks here. For now, YOLO |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'USD-P', | ||
]; | ||
|
||
List<BalanceRow> balances = [ | ||
const BalanceRow(walletType: WalletType.onChain), | ||
// TODO(bonomat): this should show the balance from the dlc channel now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -1,6 +1,7 @@ | |||
import 'package:get_10101/common/domain/model.dart'; | |||
|
|||
class SharePaymentRequest { | |||
// TODO(bonomat): this should be removed |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -46,7 +46,9 @@ class WalletScreen extends StatelessWidget { | |||
onPressed: () { | |||
context.go((hasChannel || walletChangeNotifier.lightning().sats > 0) | |||
? ReceiveScreen.route | |||
: OnboardingScreen.route); | |||
: | |||
// TODO: we should have a dedicated on-boarding screen for on-boarding with on-chain funds |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
} else { | ||
ln_dlc::create_invoice(amount_sats, description)? | ||
}; | ||
// TODO(bonomat): this can be removed as we don't support LN for now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
||
Ok(PaymentRequest { | ||
bip21: format!("bitcoin:{addr}{amount_query}"), | ||
lightning: ln_invoice.to_string(), | ||
lightning: "TODO: remove this part".to_string(), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
7a74d92
to
620935d
Compare
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
Signed-off-by: Philipp Hoenisch <philipp@coblox.tech>
620935d
to
81c3747
Compare
@@ -193,6 +193,8 @@ jobs: | |||
|
|||
e2e-tests: | |||
runs-on: ubuntu-latest | |||
# TODO(bonomat): re-run e2e tests | |||
if: false |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
9e8486f
to
dcd35ca
Compare
dcd35ca
to
f3e520d
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me.
Going ahead and merge this. |
No description provided.