mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2025-09-29 02:02:39 +02:00
Merge pull request #1039 from davotoula/1038-Profile-Lightning-payment-is-100x-too-large
millisats were incorrectly multiplied by 1000
This commit is contained in:
@@ -30,7 +30,6 @@ import androidx.compose.runtime.MutableState
|
|||||||
import androidx.compose.runtime.Stable
|
import androidx.compose.runtime.Stable
|
||||||
import androidx.lifecycle.ViewModel
|
import androidx.lifecycle.ViewModel
|
||||||
import androidx.lifecycle.ViewModelProvider
|
import androidx.lifecycle.ViewModelProvider
|
||||||
import androidx.lifecycle.map
|
|
||||||
import androidx.lifecycle.viewModelScope
|
import androidx.lifecycle.viewModelScope
|
||||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||||
import coil.imageLoader
|
import coil.imageLoader
|
||||||
@@ -44,7 +43,6 @@ import com.vitorpamplona.amethyst.model.AccountSettings
|
|||||||
import com.vitorpamplona.amethyst.model.AddressableNote
|
import com.vitorpamplona.amethyst.model.AddressableNote
|
||||||
import com.vitorpamplona.amethyst.model.Channel
|
import com.vitorpamplona.amethyst.model.Channel
|
||||||
import com.vitorpamplona.amethyst.model.LocalCache
|
import com.vitorpamplona.amethyst.model.LocalCache
|
||||||
import com.vitorpamplona.amethyst.model.LocalCache.notes
|
|
||||||
import com.vitorpamplona.amethyst.model.Note
|
import com.vitorpamplona.amethyst.model.Note
|
||||||
import com.vitorpamplona.amethyst.model.UrlCachedPreviewer
|
import com.vitorpamplona.amethyst.model.UrlCachedPreviewer
|
||||||
import com.vitorpamplona.amethyst.model.User
|
import com.vitorpamplona.amethyst.model.User
|
||||||
@@ -609,7 +607,7 @@ class AccountViewModel(
|
|||||||
|
|
||||||
fun zap(
|
fun zap(
|
||||||
note: Note,
|
note: Note,
|
||||||
amount: Long,
|
amountInMillisats: Long,
|
||||||
pollOption: Int?,
|
pollOption: Int?,
|
||||||
message: String,
|
message: String,
|
||||||
context: Context,
|
context: Context,
|
||||||
@@ -623,7 +621,7 @@ class AccountViewModel(
|
|||||||
ZapPaymentHandler(account)
|
ZapPaymentHandler(account)
|
||||||
.zap(
|
.zap(
|
||||||
note = note,
|
note = note,
|
||||||
amountMilliSats = amount,
|
amountMilliSats = amountInMillisats,
|
||||||
pollOption = pollOption,
|
pollOption = pollOption,
|
||||||
message = message,
|
message = message,
|
||||||
context = context,
|
context = context,
|
||||||
@@ -1480,7 +1478,7 @@ class AccountViewModel(
|
|||||||
LightningAddressResolver()
|
LightningAddressResolver()
|
||||||
.lnAddressInvoice(
|
.lnAddressInvoice(
|
||||||
lnaddress,
|
lnaddress,
|
||||||
milliSats * 1000,
|
milliSats,
|
||||||
message,
|
message,
|
||||||
null,
|
null,
|
||||||
onSuccess = onSuccess,
|
onSuccess = onSuccess,
|
||||||
@@ -1494,7 +1492,7 @@ class AccountViewModel(
|
|||||||
LightningAddressResolver()
|
LightningAddressResolver()
|
||||||
.lnAddressInvoice(
|
.lnAddressInvoice(
|
||||||
lnaddress,
|
lnaddress,
|
||||||
milliSats * 1000,
|
milliSats,
|
||||||
message,
|
message,
|
||||||
zapRequest.toJson(),
|
zapRequest.toJson(),
|
||||||
onSuccess = onSuccess,
|
onSuccess = onSuccess,
|
||||||
|
Reference in New Issue
Block a user