-
Notifications
You must be signed in to change notification settings - Fork 3.4k
millisat precision #10586
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
base: master
Are you sure you want to change the base?
millisat precision #10586
Changes from 8 commits
b2cebd9
5b0949d
3b322b8
ecbda4d
651254f
6e31df9
657465d
fb17752
6f567a0
32eadce
294f931
8935c29
2c1dbe8
6bc0bcd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -58,6 +58,7 @@ ElDialog { | |
| id: amountBtc | ||
| fiatfield: amountFiat | ||
| Layout.fillWidth: true | ||
| msatPrecision: true | ||
| } | ||
|
|
||
| Label { | ||
|
|
@@ -103,22 +104,23 @@ ElDialog { | |
| Layout.preferredWidth: 1 | ||
| text: qsTr('Onchain') | ||
| icon.source: '../../icons/bitcoin.png' | ||
| enabled: !amountBtc.textAsSats.hasMsatPrecision | ||
| onClicked: { dialog.isLightning = false; doAccept() } | ||
| } | ||
| FlatButton { | ||
| Layout.fillWidth: true | ||
| Layout.preferredWidth: 1 | ||
| enabled: Daemon.currentWallet.isLightning && (Daemon.currentWallet.lightningCanReceive.satsInt | ||
| > amountBtc.textAsSats.satsInt || Daemon.currentWallet.canGetZeroconfChannel) | ||
| enabled: Daemon.currentWallet.isLightning && (Daemon.currentWallet.lightningCanReceive.msatsInt | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The |
||
| > amountBtc.textAsSats.msatsInt || Daemon.currentWallet.canGetZeroconfChannel) | ||
| text: qsTr('Lightning') | ||
| icon.source: '../../icons/lightning.png' | ||
| onClicked: { | ||
| if (Daemon.currentWallet.lightningCanReceive.satsInt > amountBtc.textAsSats.satsInt) { | ||
| if (Daemon.currentWallet.lightningCanReceive.msatsInt > amountBtc.textAsSats.msatsInt) { | ||
| // can receive on existing channel | ||
| dialog.isLightning = true | ||
| doAccept() | ||
| } else if (Daemon.currentWallet.canGetZeroconfChannel && amountBtc.textAsSats.satsInt | ||
| >= Daemon.currentWallet.minChannelFunding.satsInt) { | ||
| } else if (Daemon.currentWallet.canGetZeroconfChannel && amountBtc.textAsSats.msatsInt | ||
| >= Daemon.currentWallet.minChannelFunding.msatsInt) { | ||
| // ask for confirmation of zeroconf channel to prevent fee surprise | ||
| var confirmdialog = app.messageDialog.createObject(dialog, { | ||
| title: qsTr('Confirm just-in-time channel'), | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -26,7 +26,7 @@ GridLayout { | |
| } | ||
| Label { | ||
| visible: valid | ||
| text: amount.msatsInt != 0 ? Config.formatMilliSats(amount) : Config.formatSats(amount) | ||
| text: Config.formatMilliSats(amount) | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This passes |
||
| font.family: FixedFont | ||
| } | ||
| Label { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.