refactor: remove unused dependencies

This commit is contained in:
Prad Nukala 2024-09-05 14:18:22 -04:00
parent ae99abf2c4
commit 2c602138ff
9 changed files with 4 additions and 27 deletions

View File

@ -2,7 +2,6 @@ package app
import (
"github.com/ipfs/kubo/client/rpc"
"github.com/onsonr/sonr/internal/files"
)
var (
@ -12,10 +11,7 @@ var (
// Initialize initializes the local configuration values
func init() {
err := files.Assemble(".data/vaults/0")
if err != nil {
panic(err)
}
}
// SetLocalContextSessionID sets the session ID for the local context

View File

@ -9,21 +9,12 @@ import (
"fmt"
"net/http"
_ "github.com/flimzy/go-sql.js"
wasmhttp "github.com/nlepage/go-wasm-http-server"
)
var db *sql.DB
func main() {
var err error
// Open a new in-memory SQLite database
db, err = sql.Open("sqljs", "")
if err != nil {
panic(err)
}
defer db.Close()
// Initialize the database
initDB()

View File

@ -18,11 +18,10 @@
},
"shell": {
"scripts": {
"init": ["make install", "sonrd init"],
"init": ["make install", "sh ./scripts/test_node.sh"],
"gen": ["make proto-gen", "make vault", "make templ"],
"build": ["make build", "make local-image"],
"testnet": ["make install", "make sh-testnet"],
"icnet": ["make install", "make testnet"],
"explorer": ["make explorer"]
}
}

3
go.mod
View File

@ -58,7 +58,6 @@ require (
github.com/cosmos/ibc-apps/middleware/packet-forward-middleware/v8 v8.0.2-0.20240228211029-91e486ec4dbb
github.com/cosmos/ibc-go/modules/capability v1.0.0
github.com/cosmos/ibc-go/v8 v8.2.0
github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9
github.com/go-webauthn/webauthn v0.10.2
github.com/golang/protobuf v1.5.4
github.com/gorilla/mux v1.8.1
@ -66,7 +65,6 @@ require (
github.com/ipfs/boxo v0.21.0
github.com/ipfs/kubo v0.29.0
github.com/joho/godotenv v1.5.1
github.com/mattn/go-sqlite3 v1.14.23
github.com/mr-tron/base58 v1.2.0
github.com/ncruces/go-sqlite3 v0.18.2
github.com/ncruces/go-sqlite3/gormlite v0.18.0
@ -174,7 +172,6 @@ require (
github.com/google/uuid v1.6.0 // indirect
github.com/googleapis/enterprise-certificate-proxy v0.3.2 // indirect
github.com/googleapis/gax-go/v2 v2.12.2 // indirect
github.com/gopherjs/gopherjs v0.0.0-20190430165422-3e4dfb77656c // indirect
github.com/gorilla/handlers v1.5.2 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/grpc-ecosystem/go-grpc-middleware v1.4.0 // indirect

4
go.sum
View File

@ -1107,8 +1107,6 @@ github.com/fatih/color v1.16.0 h1:zmkK9Ngbjj+K0yRhTVONQh1p/HknKYSlNT+vZCzyokM=
github.com/fatih/color v1.16.0/go.mod h1:fL2Sau1YI5c0pdGEVCbKQbLXB6edEj1ZgiY4NijnWvE=
github.com/felixge/httpsnoop v1.0.4 h1:NFTV2Zj1bL4mc9sqWACXbQFVBBg2W3GPvqp8/ESS2Wg=
github.com/felixge/httpsnoop v1.0.4/go.mod h1:m8KPJKqk1gH5J9DgRY2ASl2lWCfGKXixSwevea8zH2U=
github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9 h1:rAjGCKhKN+iStQ250cH9J9vtW9ch8/g0SXaq7Hrz4aI=
github.com/flimzy/go-sql.js v0.0.0-20170413005827-c7e22c0fd6e9/go.mod h1:N12LGw7VcXxCm94kw4ePQPPnADHUqopSEO54v/jMERc=
github.com/flynn/noise v1.1.0 h1:KjPQoQCEFdZDiP03phOvGi11+SVVhBG2wOWAorLsstg=
github.com/flynn/noise v1.1.0/go.mod h1:xbMo+0i6+IGbYdJhF31t2eR1BIU0CYc12+BNAKwUTag=
github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90/go.mod h1:R/bRT+9gY/C5z7JzPU0zXsXHKM4/ayA+zqcVNZzPa1k=
@ -1692,8 +1690,6 @@ github.com/mattn/go-isatty v0.0.20/go.mod h1:W+V8PltTTMOvKvAeJH7IuucS94S2C6jfK/D
github.com/mattn/go-runewidth v0.0.4/go.mod h1:LwmH8dsx7+W8Uxz3IHJYH5QSwggIsqBzpuz5H//U1FU=
github.com/mattn/go-sqlite3 v1.14.14/go.mod h1:NyWgC/yNuGj7Q9rpYnZvas74GogHl5/Z4A/KQRfk6bU=
github.com/mattn/go-sqlite3 v1.14.15/go.mod h1:2eHXhiwb8IkHr+BDWZGa96P6+rkvnG63S2DGjv9HUNg=
github.com/mattn/go-sqlite3 v1.14.23 h1:gbShiuAP1W5j9UOksQ06aiiqPMxYecovVGwmTxWtuw0=
github.com/mattn/go-sqlite3 v1.14.23/go.mod h1:Uh1q+B4BYcTPb+yiD3kU8Ct7aC0hY9fxUwlHK0RXw+Y=
github.com/matttproud/golang_protobuf_extensions v1.0.1/go.mod h1:D8He9yQNgCq6Z5Ld7szi9bcBfOoFv/3dc6xSMkL2PC0=
github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0/go.mod h1:QUyp042oQthUoa9bqDv0ER0wrtXnBruoNd7aNjkbP+k=
github.com/miekg/dns v1.1.26/go.mod h1:bPDLeHnStXmXAq1m/Ch/hvfNHr14JKNPMBo3VZKjuso=

View File

@ -20,7 +20,7 @@ func insertAssetQuery(name, symbol string, decimals int, chainID int64) string {
// Chain queries
func insertChainQuery(name string, networkID string) string {
return fmt.Sprintf(`INSERT INTO chains (name, network_id) VALUES (%s, %d)`, name, networkID)
return fmt.Sprintf(`INSERT INTO chains (name, network_id) VALUES (%s, %s)`, name, networkID)
}
// Credential queries

View File

@ -5,8 +5,6 @@ import (
"os"
"path/filepath"
_ "github.com/mattn/go-sqlite3"
"github.com/onsonr/sonr/internal/db"
)

Binary file not shown.

View File

@ -12,7 +12,7 @@ export CHAIN_ID=${CHAIN_ID:-"sonr-testnet-1"}
export MONIKER="florence"
export KEYALGO="secp256k1"
export KEYRING=${KEYRING:-"test"}
export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.sonr"}")
export HOME_DIR=$(eval echo "${HOME_DIR:-"~/.core"}")
export BINARY=${BINARY:-sonrd}
export DENOM=${DENOM:-usnr}