88 "testing"
99
1010 "github.com/Peersyst/xrpl-go/pkg/crypto"
11+ "github.com/Peersyst/xrpl-go/pkg/hexutil"
1112 "github.com/stretchr/testify/require"
1213)
1314
@@ -82,7 +83,7 @@ func TestCompat_EncodeDecodeAccountID(t *testing.T) {
8283 // Test decoding
8384 _ , decoded , err := DecodeClassicAddressToAccountID (tc .Base58 )
8485 require .NoError (t , err )
85- require .Equal (t , strings .ToUpper (tc .Hex ), strings . ToUpper ( hex . EncodeToString ( decoded ) ), "Decoding mismatch for base58: %s" , tc .Base58 )
86+ require .Equal (t , strings .ToUpper (tc .Hex ), hexutil . EncodeToUpperHex ( decoded ), "Decoding mismatch for base58: %s" , tc .Base58 )
8687 })
8788 }
8889}
@@ -104,7 +105,7 @@ func TestCompat_EncodeDecodeNodePublic(t *testing.T) {
104105 // Test decoding
105106 decoded , err := DecodeNodePublicKey (tc .Base58 )
106107 require .NoError (t , err )
107- require .Equal (t , strings .ToUpper (tc .Hex ), strings . ToUpper ( hex . EncodeToString ( decoded ) ), "Decoding mismatch for base58: %s" , tc .Base58 )
108+ require .Equal (t , strings .ToUpper (tc .Hex ), hexutil . EncodeToUpperHex ( decoded ), "Decoding mismatch for base58: %s" , tc .Base58 )
108109 })
109110 }
110111}
@@ -126,7 +127,7 @@ func TestCompat_EncodeDecodeAccountPublic(t *testing.T) {
126127 // Test decoding
127128 decoded , err := DecodeAccountPublicKey (tc .Base58 )
128129 require .NoError (t , err )
129- require .Equal (t , strings .ToUpper (tc .Hex ), strings . ToUpper ( hex . EncodeToString ( decoded ) ), "Decoding mismatch for base58: %s" , tc .Base58 )
130+ require .Equal (t , strings .ToUpper (tc .Hex ), hexutil . EncodeToUpperHex ( decoded ), "Decoding mismatch for base58: %s" , tc .Base58 )
130131 })
131132 }
132133}
@@ -160,7 +161,7 @@ func TestCompat_DecodeSeed(t *testing.T) {
160161 t .Run (tc .Base58 , func (t * testing.T ) {
161162 decoded , cryptoType , err := DecodeSeed (tc .Base58 )
162163 require .NoError (t , err )
163- require .Equal (t , strings .ToUpper (tc .Hex ), strings . ToUpper ( hex . EncodeToString ( decoded ) ), "Seed decoding mismatch for base58: %s" , tc .Base58 )
164+ require .Equal (t , strings .ToUpper (tc .Hex ), hexutil . EncodeToUpperHex ( decoded ), "Seed decoding mismatch for base58: %s" , tc .Base58 )
164165
165166 // Check type by comparing with known implementations
166167 if tc .Type == "ed25519" {
0 commit comments