diff --git a/ocp/data/intent/intent.go b/ocp/data/intent/intent.go index c418394..9d0af4d 100644 --- a/ocp/data/intent/intent.go +++ b/ocp/data/intent/intent.go @@ -64,7 +64,8 @@ type ExternalDepositMetadata struct { NativeAmount float64 UsdMarketValue float64 - IsSwapBuy bool + IsSwapBuy bool + IsReturned bool } type SendPublicPaymentMetadata struct { @@ -288,7 +289,8 @@ func (m *ExternalDepositMetadata) Clone() ExternalDepositMetadata { NativeAmount: m.NativeAmount, UsdMarketValue: m.UsdMarketValue, - IsSwapBuy: m.IsSwapBuy, + IsSwapBuy: m.IsSwapBuy, + IsReturned: m.IsReturned, } } @@ -302,6 +304,7 @@ func (m *ExternalDepositMetadata) CopyTo(dst *ExternalDepositMetadata) { dst.UsdMarketValue = m.UsdMarketValue dst.IsSwapBuy = m.IsSwapBuy + dst.IsReturned = m.IsReturned } func (m *ExternalDepositMetadata) Validate() error { diff --git a/ocp/data/intent/postgres/model.go b/ocp/data/intent/postgres/model.go index 713c1c4..0c1b38d 100644 --- a/ocp/data/intent/postgres/model.go +++ b/ocp/data/intent/postgres/model.go @@ -91,6 +91,7 @@ func toIntentModel(obj *intent.Record) (*intentModel, error) { m.OriginalUsdMarketValue = obj.ExternalDepositMetadata.UsdMarketValue m.IsSwap = obj.ExternalDepositMetadata.IsSwapBuy + m.IsReturned = obj.ExternalDepositMetadata.IsReturned case intent.SendPublicPayment: m.DestinationOwnerAccount = obj.SendPublicPaymentMetadata.DestinationOwnerAccount m.DestinationTokenAccount = obj.SendPublicPaymentMetadata.DestinationTokenAccount @@ -626,8 +627,8 @@ func dbGetUsdCostBasisBatch(ctx context.Context, db *sqlx.DB, mint string, owner } type Row struct { - Owner string `db:"owner"` - CostBasis float64 `db:"cost_basis"` + Owner string `db:"owner"` + CostBasis float64 `db:"cost_basis"` } rows := []*Row{}