Skip to content

Commit

Permalink
fallback to console output if opening the UI fails
Browse files Browse the repository at this point in the history
  • Loading branch information
avahowell committed May 25, 2017
1 parent e788d92 commit 943e497
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

sia-coldstorage is a utility that generates a seed and a collection of addresses for a Sia wallet, without the blockchain. This is useful for creating 'cold wallets'; you can run this utility on an airgapped machine, write down the seed and the addresses, and send coins safely to any of the addresses without having to worry about malware stealing your coins. You can use Sia to restore the seed and spend the funds at a later date.


## LICENSE

The MIT License (MIT)
13 changes: 11 additions & 2 deletions main.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package main

import (
"fmt"
"html/template"
"log"
"net"
Expand Down Expand Up @@ -28,7 +29,7 @@ const outputTmpl = `
text-align: center;
}
.info {
margin-top: 25px;
margin-top: 75px;
}
</style>
<body>
Expand Down Expand Up @@ -97,5 +98,13 @@ func main() {
})
go http.Serve(l, handler)

open.Run("http://localhost:8087")
err = open.Run("http://localhost:8087")
if err != nil {
// fallback to console.
fmt.Println("Seed:", seedStr)
fmt.Println("Addresses:")
for _, address := range addresses {
fmt.Println(address)
}
}
}

0 comments on commit 943e497

Please sign in to comment.