diff --git a/app/src/main/java/com/bitcointxoko/gudariwallet/ui/send/SendViewModel.kt b/app/src/main/java/com/bitcointxoko/gudariwallet/ui/send/SendViewModel.kt index 1b8159f..93efb36 100644 --- a/app/src/main/java/com/bitcointxoko/gudariwallet/ui/send/SendViewModel.kt +++ b/app/src/main/java/com/bitcointxoko/gudariwallet/ui/send/SendViewModel.kt @@ -183,7 +183,15 @@ class SendViewModel( val result = payer.pay(rawRes, lnurl, amountMsat, comment) if (result.isSuccess) { - recordPaymentSuccess(result.getOrThrow(), amountMsat, strings = strings) + handlePaymentResult( + paymentHash = result.getOrThrow(), + amountSats = amountMsat / WalletConstants.MSAT_PER_SAT, + bolt11 = null, + memo = null, + pubkey = null, + alias = null, + strings = strings, + ) } else { _sendState.value = SendState.Error( parseApiError( @@ -478,27 +486,6 @@ class SendViewModel( ) } - private suspend fun recordPaymentSuccess( - paymentHash : String, - amountMsat : Long, - bolt11 : String? = null, - memo : String? = null, - pubkey : String? = null, - alias : String? = null, - strings : SendStrings, - ) { - val amountSats = amountMsat / WalletConstants.MSAT_PER_SAT - handlePaymentResult( - paymentHash = paymentHash, - amountSats = amountSats, - bolt11 = bolt11, - memo = memo, - pubkey = pubkey, - alias = alias, - strings = strings, - ) - } - private fun resolveAliasesInBackground( payee : String?, routeHints : List,