fix: ens search hang

ENS search was executed in a task runner task. The task had a mistake during the copy/paste port from spawnAndSend.
This commit is contained in:
Eric Mastro 2021-04-01 10:41:10 +11:00 committed by Iuri Matias
parent 2e248d710d
commit 40dc428f63
1 changed files with 3 additions and 3 deletions

View File

@ -84,12 +84,12 @@ proc asyncMessageLoad[T](self: T, slot: string, chatId: string) =
const resolveEnsTask: Task = proc(argEncoded: string) {.gcsafe, nimcall.} =
let
arg = decode[ResolveEnsTaskArg](argEncoded)
result = status_ens.pubkey(arg.ens)
arg.finish(result)
output = status_ens.pubkey(arg.ens)
arg.finish(output)
proc resolveEns[T](self: T, slot: string, ens: string) =
let arg = ResolveEnsTaskArg(
tptr: cast[ByteAddress](asyncMessageLoadTask),
tptr: cast[ByteAddress](resolveEnsTask),
vptr: cast[ByteAddress](self.vptr),
slot: slot,
ens: ens