mirror of https://github.com/waku-org/js-waku.git
fix: Typo
This commit is contained in:
parent
6d5c2acb99
commit
fd030e0fbb
|
@ -20,7 +20,7 @@ import {
|
|||
IKeypair,
|
||||
KeypairType,
|
||||
} from "./keypair";
|
||||
import { mulitaddrFromFields } from "./multiaddr_from_fields";
|
||||
import { multiaddrFromFields } from "./multiaddr_from_fields";
|
||||
import { decodeMultiaddrs, encodeMultiaddrs } from "./multiaddrs_codec";
|
||||
import { ENRKey, ENRValue, NodeId, SequenceNumber } from "./types";
|
||||
import * as v4 from "./v4";
|
||||
|
@ -367,7 +367,7 @@ export class ENR extends Map<ENRKey, ENRValue> {
|
|||
return;
|
||||
}
|
||||
|
||||
return mulitaddrFromFields(
|
||||
return multiaddrFromFields(
|
||||
isIpv6 ? "ip6" : "ip4",
|
||||
protoName,
|
||||
ipVal,
|
||||
|
|
|
@ -1,14 +1,14 @@
|
|||
import { convertToBytes } from "@multiformats/multiaddr/convert";
|
||||
import { expect } from "chai";
|
||||
|
||||
import { mulitaddrFromFields } from "./multiaddr_from_fields";
|
||||
import { multiaddrFromFields } from "./multiaddr_from_fields";
|
||||
|
||||
describe("Multiaddr from fields", () => {
|
||||
it("tcp ip4 address", function () {
|
||||
const ipBytes = convertToBytes("ip4", "1.2.3.4");
|
||||
const portBytes = convertToBytes("tcp", "3333");
|
||||
|
||||
const ma = mulitaddrFromFields("ip4", "tcp", ipBytes, portBytes);
|
||||
const ma = multiaddrFromFields("ip4", "tcp", ipBytes, portBytes);
|
||||
|
||||
expect(ma.toString()).to.eq("/ip4/1.2.3.4/tcp/3333");
|
||||
});
|
||||
|
@ -17,7 +17,7 @@ describe("Multiaddr from fields", () => {
|
|||
const ipBytes = convertToBytes("ip6", "2345:425:2ca1::5673:23b5");
|
||||
const portBytes = convertToBytes("udp", "1111");
|
||||
|
||||
const ma = mulitaddrFromFields("ip6", "udp", ipBytes, portBytes);
|
||||
const ma = multiaddrFromFields("ip6", "udp", ipBytes, portBytes);
|
||||
|
||||
expect(ma.toString()).to.eq("/ip6/2345:425:2ca1::5673:23b5/udp/1111");
|
||||
});
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
import { Multiaddr } from "@multiformats/multiaddr";
|
||||
import { convertToString } from "@multiformats/multiaddr/convert";
|
||||
|
||||
export function mulitaddrFromFields(
|
||||
export function multiaddrFromFields(
|
||||
ipFamily: string,
|
||||
protocol: string,
|
||||
ipBytes: Uint8Array,
|
||||
|
|
Loading…
Reference in New Issue