remove auxilary dependency

This commit is contained in:
weboko 2023-01-12 00:50:56 +01:00
parent cd9d80dc66
commit 1aa1823963
No known key found for this signature in database
2 changed files with 2 additions and 7 deletions

View File

@ -10,9 +10,6 @@ import { Protocols } from "js-waku";
import * as noise from "@waku/noise";
import protobuf from "protobufjs";
import QRCode from "qrcode";
// TODO: Get rid of these
import hexToArrayBuffer from "hex-to-array-buffer";
import arrayBufferToHex from "array-buffer-to-hex";
const messagesDiv = document.getElementById("messages");
const nicknameInput = document.getElementById("nick-input");
@ -34,7 +31,7 @@ function getPairingInfofromUrl() {
throw new Error("invalid pairing information format");
const qrMessageNameTag = new Uint8Array(
hexToArrayBuffer(pairingParts.shift())
utils.hexToBytes(pairingParts.shift())
);
return new noise.InitiatorParameters(
@ -237,7 +234,7 @@ async function main() {
// Data to encode in the QR code. The qrMessageNametag too to the QR string (separated by )
const qrString =
arrayBufferToHex(pInfo.qrMessageNameTag) + ":" + pInfo.qrCode;
utils.bytesToHex(pInfo.qrMessageNameTag) + ":" + pInfo.qrCode;
const qrURLString =
window.location.href + "?" + encodeURIComponent(qrString);

View File

@ -10,8 +10,6 @@
},
"dependencies": {
"@waku/noise": "https://github.com/waku-org/js-noise.git",
"array-buffer-to-hex": "^1.0.0",
"hex-to-array-buffer": "^2.0.0",
"js-waku": "^0.29.0-29436ea",
"protobufjs": "^7.1.2",
"qrcode": "^1.5.1"