Skip to content

Commit

Permalink
Peg-in claim bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Impa10r committed Apr 8, 2024
1 parent 8c3cbc1 commit 98f297c
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Versions

## 1.2.5

- Bug fix for peg-in claim not working in v1.2.4

## 1.2.4

- Retry connecting to Telegram bot every minute if failed on start
Expand Down
5 changes: 4 additions & 1 deletion cmd/psweb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,9 @@ func main() {

log.Println("Listening on http://localhost:" + config.ListenPort)

// Start Telegram bot
go telegramStart()

// Run every minute
go startTimer()

Expand Down Expand Up @@ -1088,7 +1091,7 @@ func showVersionInfo() {
func startTimer() {
for range time.Tick(60 * time.Second) {
// Start Telegram bot if not already running
telegramStart()
go telegramStart()

// Back up to Telegram if Liquid balance changed
liquidBackup(false)
Expand Down
1 change: 1 addition & 0 deletions cmd/psweb/telegram.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ var (

func telegramStart() {
if config.TelegramToken == "" || bot != nil {
// disabled or already started
return
}

Expand Down
4 changes: 2 additions & 2 deletions cmd/psweb/templates/peer.gohtml
Original file line number Diff line number Diff line change
Expand Up @@ -164,8 +164,8 @@
{{range .Peer.Channels}}
<tr style="border: 1px dotted">
<td style="overflow-wrap: break-word;">{{.ChannelId}}</td>
<td>{{fmt .LocalBalance}}</td>
<td>{{fmt .RemoteBalance}}</td>
<td>{{m .LocalBalance}}</td>
<td>{{m .RemoteBalance}}</td>
<td>{{.Active}}</td>
</tr>
{{end}}
Expand Down

0 comments on commit 98f297c

Please sign in to comment.