Skip to content
This repository was archived by the owner on Apr 11, 2022. It is now read-only.

Commit 1865759

Browse files
committed
some lnurl tweaks.
1 parent e7eac58 commit 1865759

File tree

3 files changed

+4
-10
lines changed

3 files changed

+4
-10
lines changed

account_handlers.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,12 +162,6 @@ func lnurlWithdraw(w http.ResponseWriter, r *http.Request) {
162162

163163
// get balance
164164
balance := balanceWithReserve(data.GetAccountBalance(accountId))
165-
166-
if balance < MIN_WITHDRAWABLE {
167-
json.NewEncoder(w).Encode(lnurl.ErrorResponse("the minimum withdrawal is 10 sat, your balance is " + strconv.FormatInt(balance, 10) + " msat."))
168-
return
169-
}
170-
171165
json.NewEncoder(w).Encode(lnurl.LNURLWithdrawResponse{
172166
LNURLResponse: lnurl.LNURLResponse{Status: "OK"},
173167
Tag: "withdrawRequest",

client/Account.svelte

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@
8989
</p>
9090
<p>
9191
Can withdraw
92-
<b>{($account.can_withdraw / 1000).toFixed(3)}</b> satoshi.
92+
<b>{(($account.can_withdraw || 0) / 1000).toFixed(3)}</b> satoshi.
9393
</p>
9494
<p id="balance-notice" style="flex-shrink: 2">
9595
The withdraw amount is your balance subtracted of an amount of

lnurlpay.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -211,9 +211,9 @@ func lnurlPayValues(w http.ResponseWriter, r *http.Request) {
211211
json.NewEncoder(w).Encode(lnurl.LNURLPayResponse2{
212212
Routes: make([][]lnurl.RouteInfo, 0),
213213
PR: pr,
214-
SuccessAction: lnurl.Action("Call Details",
215-
"https://github.com/etleneum/database/tree/master/contracts/"+call.ContractId+"/calls/"+call.Id[1:2]+"/"+call.Id,
216-
),
214+
// SuccessAction: lnurl.Action("Call Details",
215+
// "https://github.com/etleneum/database/tree/master/contracts/"+call.ContractId+"/calls/"+call.Id[1:2]+"/"+call.Id,
216+
// ),
217217
Disposable: lnurl.FALSE,
218218
})
219219
}

0 commit comments

Comments
 (0)