Skip to content

Commit

Permalink
sqlite: default pinned settings when unset
Browse files Browse the repository at this point in the history
  • Loading branch information
n8maninger committed May 3, 2024
1 parent 9f9ad89 commit fe22b63
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion persist/sqlite/settings.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,10 @@ FROM host_pinned_settings;`

err = s.queryRow(query).Scan(&pinned.Currency, &pinned.Threshold, &pinned.Storage.Pinned, &pinned.Storage.Value, &pinned.Ingress.Pinned, &pinned.Ingress.Value, &pinned.Egress.Pinned, &pinned.Egress.Value, &pinned.MaxCollateral.Pinned, &pinned.MaxCollateral.Value)
if errors.Is(err, sql.ErrNoRows) {
return pin.PinnedSettings{}, nil
return pin.PinnedSettings{
Currency: "usd",
Threshold: 0.02,
}, nil
}
return
}
Expand Down

0 comments on commit fe22b63

Please sign in to comment.