Remove dupe code

This commit is contained in:
Franck Royer 2021-07-06 15:20:18 +10:00
parent f2a2233c77
commit 381333347e
No known key found for this signature in database
GPG Key ID: A82ED75A8DFC50A4
1 changed files with 1 additions and 6 deletions

View File

@ -19,12 +19,7 @@ export class WakuMessage {
timestamp: Date = new Date()
): WakuMessage {
const payload = Buffer.from(utf8, 'utf-8');
return new WakuMessage({
payload,
version: DefaultVersion,
contentTopic,
timestamp: timestamp.valueOf() / 1000,
});
return WakuMessage.fromBytes(payload, contentTopic, timestamp);
}
/**