Skip to content

Commit

Permalink
Merge pull request #24 from Impa10r/v1.2.6
Browse files Browse the repository at this point in the history
V1.2.6
  • Loading branch information
Impa10r authored Apr 11, 2024
2 parents 5ad5a40 + f15c9f0 commit 655b163
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 9 deletions.
1 change: 1 addition & 0 deletions .env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
DEBUG=1
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
push.sh
18 changes: 18 additions & 0 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Launch Package",
"type": "go",
"request": "launch",
"mode": "auto",
"buildFlags": "-tags lnd",
"program": "${workspaceFolder}/cmd/psweb/",
"showLog": false,
"envFile": "${workspaceFolder}/.env",
}
]
}
15 changes: 15 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"version": "2.0.0",
"tasks": [
{
"label": "pre-commit",
"type": "shell",
"command": "${workspaceFolder}/.git/hooks/pre-commit",
"group": "none",
"presentation": {
"reveal": "never"
},
"problemMatcher": []
}
]
}
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
# Versions

## 1.2.6

- Fix bug in conversion to millions
- Add Makefile, update installation instructions

## 1.2.5

- Bug fix for peg-in claim not working in v1.2.4
Expand Down
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
install:
go install ./cmd/psweb
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ Clone the repository and build PeerSwap Web UI:

```bash
git clone https://github.com/Impa10r/peerswap-web && \
cd peerswap-web/cmd/psweb && \
go install
cd peerswap-web && \
make install
```

This will install `psweb` to your GOPATH (/home/USER/go/bin). You can check that it is working by running `psweb --version`. If not, add the bin path in .profile and reload with `source .profile`.
Expand Down Expand Up @@ -107,8 +107,8 @@ When a new version comes out, just build the app again and restart:
```bash
rm -rf peerswap-web && \
git clone https://github.com/Impa10r/peerswap-web && \
cd peerswap-web/cmd/psweb && \
go install && \
cd peerswap-web && \
make install && \
sudo systemctl restart psweb
```

Expand Down
1 change: 0 additions & 1 deletion cmd/psweb/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ func getClientConn(address string) (*grpc.ClientConn, error) {
maxMsgRecvSize := grpc.MaxCallRecvMsgSize(1 * 1024 * 1024 * 200)
opts := []grpc.DialOption{
grpc.WithDefaultCallOptions(maxMsgRecvSize),
//grpc.WithInsecure(),
grpc.WithTransportCredentials(insecure.NewCredentials()),
}

Expand Down
6 changes: 3 additions & 3 deletions cmd/psweb/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ var (
logFile *os.File
)

const version = "v1.2.5"
const version = "v1.2.6"

func main() {

Expand Down Expand Up @@ -1357,7 +1357,7 @@ func bumpfeeHandler(w http.ResponseWriter, r *http.Request) {
}

if config.PeginTxId == "" {
redirectWithError(w, r, "/bitcoin?", errors.New("No pending peg-in"))
redirectWithError(w, r, "/bitcoin?", errors.New("no pending peg-in"))
return
}

Expand All @@ -1376,7 +1376,7 @@ func bumpfeeHandler(w http.ResponseWriter, r *http.Request) {
}

if tx.OutputDetails[index].Amount == config.PeginAmount {
redirectWithError(w, r, "/bitcoin?", errors.New("Peg-in tx has no change, not possible to bump"))
redirectWithError(w, r, "/bitcoin?", errors.New("peg-in tx has no change, not possible to bump"))
return
}

Expand Down
2 changes: 1 addition & 1 deletion cmd/psweb/utils.go
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ func toUint(num int64) uint64 {
}

func toMil(num uint64) string {
return fmt.Sprintf("%.1f", float32(num/1000000))
return fmt.Sprintf("%.1f", float32(num)/1000000)
}

func getNodeAlias(key string) string {
Expand Down

0 comments on commit 655b163

Please sign in to comment.