Skip to content

Commit

Permalink
chore: remove useless db fields
Browse files Browse the repository at this point in the history
  • Loading branch information
Primexz committed Jul 21, 2024
1 parent 655e14f commit 8b90bf4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions metricRecorder/metricRecorder.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,10 @@ func StartMetricRecorder() {

//convert satoshi to btc
var walletBtc = watcher.WalletWatcher.SatAmount / 100_000_000
var timeSpent = float64(time.Since(startTime).Milliseconds())

ret, err := timescale.ConnectionPool.Exec(context.Background(), "INSERT INTO investment_exporter (time, total_btc_on_kraken, total_cache_to_kraken, eur_on_kraken, btc_price_eur, btc_price_usd, btc_in_wallet, eur_in_wallet, total_scrape_time, next_dca_order_time, pending_fiat) VALUES (NOW(), $1, $2, $3, $4, $5, $6, $7, $8, $9, $10)",
btcOnKraken, totalCache-pendingFiat, btcOnKraken*btcEurPrice, btcEurPrice, btcUsdPrice, walletBtc, walletBtc*btcEurPrice, float64(time.Since(startTime).Milliseconds()), watcher.DCAWatcher.NextOrder, pendingFiat)
ret, err := timescale.ConnectionPool.Exec(context.Background(), "INSERT INTO investment_exporter (time, total_btc_on_kraken, total_cache_to_kraken, btc_price_eur, btc_price_usd, btc_in_wallet, total_scrape_time, next_dca_order_time, pending_fiat) VALUES (NOW(), $1, $2, $3, $4, $5, $6, $7, $8)",
btcOnKraken, totalCache-pendingFiat, btcEurPrice, btcUsdPrice, walletBtc, timeSpent, watcher.DCAWatcher.NextOrder, pendingFiat)

if err != nil {
log.Error("failed to insert metrics into timescale: ", err, ret)
Expand Down
2 changes: 1 addition & 1 deletion modules/xPub/xPub.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ func (x *XPub) GetAddressSatMap() (map[string]float64, error) {
log.WithFields(logrus.Fields{
"index": i,
"address": address,
}).Info("Computing bitcoin address ")
}).Debug("Computing bitcoin address ")

scriptHash, err := electrum.AddressToElectrumScriptHash(address)
if err != nil {
Expand Down

0 comments on commit 8b90bf4

Please sign in to comment.