File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -69,14 +69,18 @@ function processGetAddrResponse(response: Buffer) {
69
69
partialResponse = partialResponse . slice ( 1 + PKLEN )
70
70
71
71
let hash : Buffer | undefined
72
+ let address : string ;
73
+
72
74
if ( PKLEN != ED25519_PK_SIZE ) {
73
75
hash = Buffer . from ( partialResponse . slice ( 0 , 20 ) )
74
- }
75
76
76
- //"advance" buffer
77
- partialResponse = partialResponse . slice ( 20 )
78
-
79
- const address = Buffer . from ( partialResponse . subarray ( 0 , - 2 ) ) . toString ( )
77
+ //"advance" buffer
78
+ partialResponse = partialResponse . slice ( 20 )
79
+ address = Buffer . from ( partialResponse . subarray ( 0 , - 2 ) ) . toString ( )
80
+ } else {
81
+ // ED25519: Convert raw bytes to hex string
82
+ address = partialResponse . subarray ( 0 , - 2 ) . toString ( 'hex' ) ;
83
+ }
80
84
81
85
return {
82
86
publicKey,
You can’t perform that action at this time.
0 commit comments