Skip to content

Commit

Permalink
Put data and transactionHash as top-level error fields
Browse files Browse the repository at this point in the history
  • Loading branch information
fvictorio committed Mar 2, 2024
1 parent a676a48 commit e4247f0
Showing 1 changed file with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,10 +408,9 @@ export class EdrProviderWrapper
if (stackTrace !== undefined) {
error = encodeSolidityStackTrace(response.error.message, stackTrace);
// Pass data and transaction hash from the original error
(error as any).data = {
data: response.error.data?.data ?? undefined,
transactionHash: response.error.data?.transactionHash ?? undefined,
};
(error as any).data = response.error.data?.data ?? undefined;
(error as any).transactionHash =
response.error.data?.transactionHash ?? undefined;
} else {
if (response.error.code === InvalidArgumentsError.CODE) {
error = new InvalidArgumentsError(response.error.message);
Expand Down

0 comments on commit e4247f0

Please sign in to comment.