delphi.market/db/withdrawal.go

14 lines
291 B
Go
Raw Normal View History

2023-12-03 05:21:57 +00:00
package db
import (
"context"
"database/sql"
)
func (db *DB) CreateWithdrawal(tx *sql.Tx, c context.Context, w *Withdrawal) error {
if _, err := tx.ExecContext(c, "INSERT INTO withdrawals(pubkey, bolt11) VALUES ($1, $2)", w.Pubkey, w.Bolt11); err != nil {
return err
}
return nil
}