-
Notifications
You must be signed in to change notification settings - Fork 204
Open
Description
catch (err) {
// ethersjs currently doesnt throw for custom solidity errors, so we shouldn't end up here
// however we try to catch and parse the error anyway in case ethersjs changes
// behaviour and we dont pick up on it
retryable = retryableData_1.RetryableDataTools.tryParseError(err);
if (!(0, lib_1.isDefined)(retryable)) {
throw new errors_1.ArbSdkError('No retryable data found in error', err);
}
}
Metamask extension throws an error in populateFunctionParams after a recent update, so we do end up here
original error is stored at
err.error.data.originalError.data
I was able to fix this issue in my setup by modifying the catch block as follows:
catch (err) {
// ethersjs currently doesnt throw for custom solidity errors, so we shouldn't end up here
// however we try to catch and parse the error anyway in case ethersjs changes
// behaviour and we dont pick up on it
const res = err.error?.data?.originalError?.data ?? err
retryable = retryableData_1.RetryableDataTools.tryParseError(res);
if (!(0, lib_1.isDefined)(retryable)) {
throw new errors_1.ArbSdkError('No retryable data found in error', err);
}
}
Metadata
Metadata
Assignees
Labels
No labels