Minor fixups

This commit is contained in:
Ladd Hoffman 2023-04-16 18:03:01 -05:00
parent 3141d07a41
commit dad2d66fc8
4 changed files with 5 additions and 12 deletions

View File

@ -49,15 +49,6 @@ export class Expert extends ReputationHolder {
return this;
}
async submitPostViaNetwork(forumNode, post, stake) {
// TODO: Include fee
const postMessage = new PostMessage({ post, stake });
await postMessage.sign(this.reputationKey);
await this.actions.submitPostViaNetwork.log(this, forumNode);
// For now, directly call forumNode.receiveMessage();
await forumNode.receiveMessage(JSON.stringify(postMessage.toJSON()));
}
async submitPostWithFee(postContent, poolOptions) {
const post = await this.dao.forum.addPost(this.reputationPublicKey, postContent);
await this.actions.submitPost.log(this, post);

View File

@ -191,7 +191,7 @@ export class Forum extends ReputationHolder {
const authorVertex = authorEdge.to;
const author = authorVertex.data;
const { tokenId: authorTokenId } = authorEdge.data;
this.dao.reputation.transfer(this.id, author.publicKey, authorTokenId);
this.dao.reputation.transfer(this.id, author.reputationPublicKey, authorTokenId);
}
}

View File

@ -1,4 +1,5 @@
import { INCINERATOR_ADDRESS, mochaRun } from '../../../util/helpers.js';
import { mochaRun } from '../../../util/helpers.js';
import { INCINERATOR_ADDRESS } from '../../../util/constants.js';
import { ForumTest } from './forum.test-util.js';
describe('Forum', function tests() {

View File

@ -1,4 +1,5 @@
import { INCINERATOR_ADDRESS, mochaRun } from '../../../util/helpers.js';
import { mochaRun } from '../../../util/helpers.js';
import { INCINERATOR_ADDRESS } from '../../../util/constants.js';
import { ForumTest } from './forum.test-util.js';
describe('Forum', function tests() {