diff --git a/package.json b/package.json index ab1f1c531d..a04c9dddc4 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/src/core/blockchain/web3-private/web3-private.ts b/src/core/blockchain/web3-private/web3-private.ts index b73147772e..afca23fff8 100644 --- a/src/core/blockchain/web3-private/web3-private.ts +++ b/src/core/blockchain/web3-private/web3-private.ts @@ -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'; @@ -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(); }