From 43f50aa992438be4275a4b5716307b372c6ce5a2 Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 9 Oct 2024 20:06:50 +0200 Subject: [PATCH 1/2] Remove unreferenced unused key files. --- core/services/keystore/keys/ethkey/key.go | 34 ------------------- .../services/keystore/keys/ethkey/key_test.go | 19 ----------- 2 files changed, 53 deletions(-) delete mode 100644 core/services/keystore/keys/ethkey/key.go delete mode 100644 core/services/keystore/keys/ethkey/key_test.go diff --git a/core/services/keystore/keys/ethkey/key.go b/core/services/keystore/keys/ethkey/key.go deleted file mode 100644 index 02f256b320d..00000000000 --- a/core/services/keystore/keys/ethkey/key.go +++ /dev/null @@ -1,34 +0,0 @@ -package ethkey - -import ( - "time" - - "github.com/smartcontractkit/chainlink-common/pkg/sqlutil" - "github.com/smartcontractkit/chainlink/v2/core/chains/evm/types" -) - -// NOTE: This model refers to the OLD key and is only used for migrations -// -// Key holds the private key metadata for a given address that is used to unlock -// said key when given a password. -// -// By default, a key is assumed to represent an ethereum account. -type Key struct { - ID int32 - Address types.EIP55Address - JSON sqlutil.JSON `json:"-"` - CreatedAt time.Time `json:"-"` - UpdatedAt time.Time `json:"-"` - DeletedAt *time.Time `json:"-"` - // IsFunding marks the address as being used for rescuing the node and the pending transactions - // Only one key can be IsFunding=true at a time. - IsFunding bool -} - -// Type returns type of key -func (k Key) Type() string { - if k.IsFunding { - return "funding" - } - return "sending" -} diff --git a/core/services/keystore/keys/ethkey/key_test.go b/core/services/keystore/keys/ethkey/key_test.go deleted file mode 100644 index 9255c0f830f..00000000000 --- a/core/services/keystore/keys/ethkey/key_test.go +++ /dev/null @@ -1,19 +0,0 @@ -package ethkey - -import ( - "testing" - - "github.com/stretchr/testify/assert" -) - -func TestEthKey_Type(t *testing.T) { - k := Key{ - IsFunding: true, - } - k2 := Key{ - IsFunding: false, - } - - assert.Equal(t, k.Type(), "funding") - assert.Equal(t, k2.Type(), "sending") -} From 3fd3d191139f5f45d2c33ee51ed3afed0250286b Mon Sep 17 00:00:00 2001 From: pavel-raykov Date: Wed, 9 Oct 2024 20:16:05 +0200 Subject: [PATCH 2/2] Add changeset. --- .changeset/neat-numbers-lay.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/neat-numbers-lay.md diff --git a/.changeset/neat-numbers-lay.md b/.changeset/neat-numbers-lay.md new file mode 100644 index 00000000000..69276e84f68 --- /dev/null +++ b/.changeset/neat-numbers-lay.md @@ -0,0 +1,5 @@ +--- +"chainlink": minor +--- + +#removed Removing unreferenced unused files.