diff --git a/aesgcm.go b/aesgcm.go index 5f7002d7..67001c48 100644 --- a/aesgcm.go +++ b/aesgcm.go @@ -7,7 +7,7 @@ import ( "encoding/hex" "strings" - "golang.org/x/crypto/scrypt" + "golang.org/x/crypto/argon2" ) func DeriveKey(password string, salt []byte) ([]byte, []byte, error) { @@ -18,10 +18,7 @@ func DeriveKey(password string, salt []byte) ([]byte, []byte, error) { } } - key, err := scrypt.Key([]byte(password), salt, 131072, 8, 1, 32) - if err != nil { - return nil, nil, err - } + key := argon2.Key([]byte(password), salt, 3, 32*1024, 1, 32) return key, salt, nil } diff --git a/breez.go b/breez.go index d5ccf8ac..10d42bcb 100644 --- a/breez.go +++ b/breez.go @@ -187,6 +187,10 @@ func (bs *BreezService) LookupInvoice(ctx context.Context, senderPubkey string, func (bs *BreezService) ListTransactions(ctx context.Context, senderPubkey string, from, until, limit, offset uint64, unpaid bool, invoiceType string) (transactions []Nip47Transaction, err error) { request := breez_sdk.ListPaymentsRequest{} + if limit == 0 { + // make sure a sensible limit is passed + limit = 100 + } if limit > 0 { limit32 := uint32(limit) request.Limit = &limit32 diff --git a/config.go b/config.go index 938efd45..4c60c12b 100644 --- a/config.go +++ b/config.go @@ -25,7 +25,7 @@ type AppConfig struct { LNDMacaroonFile string `envconfig:"LND_MACAROON_FILE"` Workdir string `envconfig:"WORK_DIR" default:".data"` Port string `envconfig:"PORT" default:"8080"` - DatabaseUri string `envconfig:"DATABASE_URI" default:"nostr-wallet-connect.db"` + DatabaseUri string `envconfig:"DATABASE_URI" default:".data/nwc.db"` CookieSecret string `envconfig:"COOKIE_SECRET"` }