jnordberg / dsteem

Steem blockchain RPC client
https://jnordberg.github.io/dsteem/
Other
82 stars 57 forks source link

DeleteCommentOperation get Internal Error #18

Closed knightpop closed 6 years ago

knightpop commented 6 years ago

Hello! Nice weekend.

I have something to ask you while using dsteem.

public deletePost(permLink: string): Promise<TransactionConfirmation> {
        let deleteOperation: DeleteCommentOperation = {
            0: "delete_comment",
            1: {
                author: this.authorNickname,
                permlink: permLink
            }
        };

        return this.client.broadcast.sendOperations([deleteOperation], this.PrivateApiKey).then(response => {
            return Promise.resolve(response);
        }, reason => {
            console.warn(reason.message);
            return Promise.resolve(undefined);
        })
    }

I put my nickname to the author, and also put permLink. But It doesn't warn and tells me Internal Error.

But unfortunately, I cannot find any example of using delete disqussion.

Do I correctly use API or, any other precondition?

ps: I can upload blog with this ApiKey.

jnordberg commented 6 years ago

You're using promises a bit weird but Internal Error is from the RPC node, try a different one and see if that helps

knightpop commented 6 years ago

Hmm. Thanks! I will try anything other way!