review fixes

This commit is contained in:
duriancrepe 2022-03-08 08:37:05 -08:00
parent 90b2f6aae1
commit 1777192d23
2 changed files with 3 additions and 4 deletions

View file

@ -880,7 +880,7 @@ test("Can complete a trade", async () => {
fetchedTrade = await alice.getTrade(trade.getTradeId());
expect(fetchedTrade.getPhase()).toEqual("DEPOSIT_PUBLISHED");
await testTradeChat(trade.getTradeId(), alice, bob);
await testTradeChat(trade.getTradeId(), alice, bob); // test trader chat
// mine until deposit txs unlock
HavenoUtils.log(1, "Mining to unlock deposit txs");
@ -1857,7 +1857,6 @@ async function testTradeChat(tradeId: string, alice: HavenoDaemon, bob: HavenoDa
expect(chatNotifications.length).toBe(offset+msgs.length);
expect(chatNotifications[0].getChatMessage()?.getMessage()).toEqual(aliceMsg);
for (var i = 0; i < msgs.length; i++) {
// notifications messages are trimmed
expect(chatNotifications[i+offset].getChatMessage()?.getMessage()).toEqual(msgs[i].trim());
expect(chatNotifications[i + offset].getChatMessage()?.getMessage()).toEqual(msgs[i]);
}
}

View file

@ -1030,7 +1030,7 @@ class HavenoDaemon {
/**
* Get all chat messages for a trade.
*
* @param {string} tradeId
* @param {string} tradeId - the id of the trade
*/
async getChatMessages(tradeId: string): Promise<ChatMessage[]> {
let that = this;