mirror of
https://github.com/logos-messaging/logos-messaging-js.git
synced 2026-02-27 03:23:20 +00:00
revert distracting changes
This commit is contained in:
parent
3bb5a4931f
commit
ec8ded9c6a
@ -5,8 +5,7 @@ import type {
|
|||||||
IMessage,
|
IMessage,
|
||||||
IProtoMessage,
|
IProtoMessage,
|
||||||
IRateLimitProof,
|
IRateLimitProof,
|
||||||
IRoutingInfo,
|
IRoutingInfo
|
||||||
PubsubTopic
|
|
||||||
} from "@waku/interfaces";
|
} from "@waku/interfaces";
|
||||||
import { Logger } from "@waku/utils";
|
import { Logger } from "@waku/utils";
|
||||||
|
|
||||||
@ -29,10 +28,6 @@ export class RLNEncoder implements IEncoder {
|
|||||||
this.idSecretHash = identityCredential.IDSecretHash;
|
this.idSecretHash = identityCredential.IDSecretHash;
|
||||||
}
|
}
|
||||||
|
|
||||||
public get pubsubTopic(): PubsubTopic {
|
|
||||||
return this.encoder.pubsubTopic;
|
|
||||||
}
|
|
||||||
|
|
||||||
public async toWire(message: IMessage): Promise<Uint8Array | undefined> {
|
public async toWire(message: IMessage): Promise<Uint8Array | undefined> {
|
||||||
message.rateLimitProof = await this.generateProof(message);
|
message.rateLimitProof = await this.generateProof(message);
|
||||||
log.info("Proof generated", message.rateLimitProof);
|
log.info("Proof generated", message.rateLimitProof);
|
||||||
@ -61,6 +56,10 @@ export class RLNEncoder implements IEncoder {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public get pubsubTopic(): string {
|
||||||
|
return this.encoder.pubsubTopic;
|
||||||
|
}
|
||||||
|
|
||||||
public get routingInfo(): IRoutingInfo {
|
public get routingInfo(): IRoutingInfo {
|
||||||
return this.encoder.routingInfo;
|
return this.encoder.routingInfo;
|
||||||
}
|
}
|
||||||
@ -98,7 +97,7 @@ export class RLNDecoder<T extends IDecodedMessage>
|
|||||||
private readonly decoder: IDecoder<T>
|
private readonly decoder: IDecoder<T>
|
||||||
) {}
|
) {}
|
||||||
|
|
||||||
public get pubsubTopic(): PubsubTopic {
|
public get pubsubTopic(): string {
|
||||||
return this.decoder.pubsubTopic;
|
return this.decoder.pubsubTopic;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -448,11 +448,7 @@ export class ServiceNode {
|
|||||||
if (body) options.body = JSON.stringify(body);
|
if (body) options.body = JSON.stringify(body);
|
||||||
|
|
||||||
const response = await fetch(`${this.httpUrl}${endpoint}`, options);
|
const response = await fetch(`${this.httpUrl}${endpoint}`, options);
|
||||||
log.info(
|
log.info(`Received REST Response: `, response.status);
|
||||||
`Received REST Response: `,
|
|
||||||
response.status,
|
|
||||||
response.statusText
|
|
||||||
);
|
|
||||||
return await processResponse(response);
|
return await processResponse(response);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
log.error(`${this.httpUrl} failed with error:`, error);
|
log.error(`${this.httpUrl} failed with error:`, error);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user