Skip to content

WebSocketProvider's getTransactionReceipt throws "unknown error" for pending tx #813

Closed
@danielattilasimon

Description

I believe other Providers return null in this case.

I think the error originates from this part:

if (result.result) {
request.callback(null, result.result);
} else {
if (result.error) {
const error: any = new Error(result.error.message || "unknown error");
defineReadOnly(error, "code", result.error.code || null);
defineReadOnly(error, "response", data);
request.callback(error, undefined);
} else {
request.callback(new Error("unknown error"), undefined);
}
}

When a receipt is not found, result.result will be null.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    bugVerified to be an issue.fixed/completeThis Bug is fixed or Enhancement is complete and published.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions