From 8ef2311d8e25faa78526feed48106cab9dc503f1 Mon Sep 17 00:00:00 2001 From: Mohammed Sohail Date: Fri, 14 Apr 2023 08:05:05 +0000 Subject: [PATCH] fix: export TxStatus struct --- internal/store/otx.go | 6 +++--- internal/store/store.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/store/otx.go b/internal/store/otx.go index 722469a..96c608a 100644 --- a/internal/store/otx.go +++ b/internal/store/otx.go @@ -22,7 +22,7 @@ type ( GasPrice *big.Int Nonce uint64 } - txStatus struct { + TxStatus struct { CreatedAt time.Time `db:"created_at" json:"createdAt"` Status string `db:"status" json:"status"` TransferValue uint64 `db:"transfer_value" json:"transferValue"` @@ -85,9 +85,9 @@ func (s *PgStore) GetNextNonce( func (s *PgStore) GetTxStatus( ctx context.Context, trackingId string, -) (txStatus, error) { +) (TxStatus, error) { var ( - tx txStatus + tx TxStatus ) rows, err := s.db.Query( diff --git a/internal/store/store.go b/internal/store/store.go index 5027193..f0f40a7 100644 --- a/internal/store/store.go +++ b/internal/store/store.go @@ -22,7 +22,7 @@ type ( // Otx related actions. CreateOtx(context.Context, Otx) (uint, error) GetNextNonce(context.Context, string) (uint64, error) - GetTxStatus(context.Context, string) (txStatus, error) + GetTxStatus(context.Context, string) (TxStatus, error) CreateDispatchStatus(context.Context, uint, enum.OtxStatus) error UpdateDispatchStatus(context.Context, bool, string, uint64) error // Account related actions.