File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 149
149
"@libp2p/crypto" : " ^1.0.11" ,
150
150
"@libp2p/interface-peer-id" : " ^2.0.0" ,
151
151
"@libp2p/interface-record" : " ^2.0.1" ,
152
+ "@libp2p/interfaces" : " ^3.2.0" ,
152
153
"@libp2p/logger" : " ^2.0.5" ,
153
154
"@libp2p/peer-id" : " ^2.0.0" ,
154
155
"@libp2p/utils" : " ^3.0.0" ,
155
156
"@multiformats/multiaddr" : " ^11.0.0" ,
156
- "err-code" : " ^3.0.1" ,
157
157
"interface-datastore" : " ^7.0.0" ,
158
158
"it-all" : " ^2.0.0" ,
159
159
"it-filter" : " ^2.0.0" ,
Original file line number Diff line number Diff line change 1
- import errCode from 'err-code '
1
+ import { CodeError } from '@libp2p/interfaces/errors '
2
2
import { fromString as uint8arraysFromString } from 'uint8arrays/from-string'
3
3
import { equals as uint8ArrayEquals } from 'uint8arrays/equals'
4
4
import { unmarshalPrivateKey , unmarshalPublicKey } from '@libp2p/crypto/keys'
@@ -66,7 +66,7 @@ export class RecordEnvelope implements Envelope {
66
66
const valid = await envelope . validate ( domain )
67
67
68
68
if ( ! valid ) {
69
- throw errCode ( new Error ( 'envelope signature is not valid for the given domain' ) , codes . ERR_SIGNATURE_NOT_VALID )
69
+ throw new CodeError ( 'envelope signature is not valid for the given domain' , codes . ERR_SIGNATURE_NOT_VALID )
70
70
}
71
71
72
72
return envelope
You can’t perform that action at this time.
0 commit comments