Skip to content

Commit

Permalink
[spv-721][review-fixes] - fixing conversion of DeletedAd field betwee…
Browse files Browse the repository at this point in the history
…n engine.Model and common.Model
  • Loading branch information
mariusz-4chain committed Apr 23, 2024
1 parent 08eb8e1 commit af987f9
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
1 change: 1 addition & 0 deletions config/validate_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package config

import (
"errors"

Check failure on line 5 in config/validate_nodes.go

View workflow job for this annotation

GitHub Actions / style-lint

File is not `gci`-ed with --skip-generated -s standard -s default -s prefix(bitcoin-sv/spv-wallet) (gci)
"slices"
)

Expand Down
8 changes: 3 additions & 5 deletions mappings/common/common_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@ package common

import (
"database/sql"
"fmt"
"testing"
"time"

"github.com/bitcoin-sv/spv-wallet/engine"
"github.com/bitcoin-sv/spv-wallet/engine/datastore/customtypes"
"github.com/stretchr/testify/assert"
"testing"
"time"
)

func TestMapToContract_NewlyCreatedRecord(t *testing.T) {
Expand All @@ -18,7 +18,6 @@ func TestMapToContract_NewlyCreatedRecord(t *testing.T) {
}

commonModel := MapToContract(&engineModel)
fmt.Printf("Struct: %+v", commonModel)
assert.Equal(t, engineModel.CreatedAt, commonModel.CreatedAt)
assert.Equal(t, engineModel.UpdatedAt, commonModel.UpdatedAt)
assert.Nil(t, commonModel.DeletedAt)
Expand All @@ -39,7 +38,6 @@ func TestMapToContract_DeletedAtFieldSet(t *testing.T) {
}

commonModel := MapToContract(&engineModel)
fmt.Printf("Struct: %+v", commonModel)
assert.Equal(t, engineModel.CreatedAt, commonModel.CreatedAt)
assert.Equal(t, engineModel.UpdatedAt, commonModel.UpdatedAt)
assert.Equal(t, engineModel.DeletedAt.Time, *commonModel.DeletedAt)
Expand Down

0 comments on commit af987f9

Please # to comment.