Fix retrieving with pubkey object

pull/1224/head
Maxim Shishmarev 5 years ago
parent ae35626b35
commit 29fe64f5d5

@ -347,7 +347,7 @@ export async function storeOnNode(
export async function retrieveNextMessages(
nodeData: Snode,
lastHash: string,
pubkey: PubKey
pubkey: string
): Promise<Array<any>> {
const params = {
pubKey: pubkey,

@ -119,11 +119,11 @@ export class SwarmPolling {
): Promise<Array<any>> {
const edkey = node.pubkey_ed25519;
const pkStr = pubkey.key ? pubkey.key : pubkey;
const pkStr = (pubkey.key ? pubkey.key : pubkey) as string;
const prevHash = await this.getLastHash(edkey, pkStr as string);
const prevHash = await this.getLastHash(edkey, pkStr);
const messages = await retrieveNextMessages(node, prevHash, pubkey);
const messages = await retrieveNextMessages(node, prevHash, pkStr);
if (!messages.length) {
return [];

Loading…
Cancel
Save