Skip to content

Commit

Permalink
Merge pull request #220 from Cryptorubic/develop
Browse files Browse the repository at this point in the history
version 2.17.6
  • Loading branch information
ottebrut authored Oct 3, 2022
2 parents 8cfe681 + d492b3c commit d00c8b7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "rubic-sdk",
"version": "2.17.5",
"version": "2.17.6",
"description": "Simplify dApp creation",
"main": "lib/index.js",
"types": "lib/index.d.ts",
Expand Down
9 changes: 8 additions & 1 deletion src/core/blockchain/web3-private/web3-private.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,11 @@ import { WalletConnectionConfiguration } from '@rsdk-core/blockchain/models/wall
import { RubicSdkError } from '@rsdk-common/errors/rubic-sdk.error';
import { FailedToCheckForTransactionReceiptError } from '@rsdk-common/errors/swap/failed-to-check-for-transaction-receipt.error';
import { BlockchainName, BlockchainsInfo, Web3Pure } from 'src/core';
import { LowSlippageError, WrongNetworkError } from 'src/common';
import {
InsufficientFundsGasPriceValueError,
LowSlippageError,
WrongNetworkError
} from 'src/common';
import { parseError } from 'src/common/utils/errors';
import { TransactionConfig } from 'web3-core';

Expand Down Expand Up @@ -46,6 +50,9 @@ export class Web3Private {
if (err.message.includes('execution reverted: UNIV3R: min return')) {
return new LowSlippageError();
}
if (err.message.includes('execution reverted: Address: low-level call with value failed')) {
return new InsufficientFundsGasPriceValueError();
}
if (err.message.includes('Failed to check for transaction receipt')) {
return new FailedToCheckForTransactionReceiptError();
}
Expand Down

0 comments on commit d00c8b7

Please sign in to comment.