Drop useless encoding (#110)

* drop asec private key encoding

* remove pubkey/relaykey/url encoding in common pkg

* fix pubkey encoding

* remove SecKey
This commit is contained in:
Louis Singer
2024-02-20 17:35:11 +01:00
committed by GitHub
parent ffcf08420f
commit 936f9c5f51
9 changed files with 27 additions and 471 deletions

View File

@@ -7,7 +7,6 @@ import (
"os"
"testing"
"github.com/ark-network/ark/common"
"github.com/ark-network/ark/common/tree"
"github.com/ark-network/ark/internal/core/domain"
"github.com/ark-network/ark/internal/core/ports"
@@ -21,7 +20,7 @@ import (
)
const (
testingKey = "apub1qgvdtj5ttpuhkldavhq8thtm5auyk0ec4dcmrfdgu0u5hgp9we22v3hrs4x"
testingKey = "0218d5ca8b58797b7dbd65c075dd7ba7784b3f38ab71b1a5a8e3f94ba0257654a6"
minRelayFee = uint64(30)
roundLifetime = int64(1209344)
)
@@ -38,7 +37,8 @@ func TestMain(m *testing.M) {
wallet.On("SelectUtxos", mock.Anything, mock.Anything, mock.Anything).
Return(randomInput, uint64(0), nil)
_, pubkey, _ = common.DecodePubKey(testingKey)
pubkeyBytes, _ := hex.DecodeString(testingKey)
pubkey, _ = secp256k1.ParsePubKey(pubkeyBytes)
os.Exit(m.Run())
}