diff options
Diffstat (limited to 'packages/instant/src/util/asset.ts')
-rw-r--r-- | packages/instant/src/util/asset.ts | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/packages/instant/src/util/asset.ts b/packages/instant/src/util/asset.ts index 5e83e7e6d..756194f1f 100644 --- a/packages/instant/src/util/asset.ts +++ b/packages/instant/src/util/asset.ts @@ -113,7 +113,11 @@ export const assetUtils = { assetBuyerErrorMessage: (asset: ERC20Asset, error: Error): string | undefined => { if (error.message === AssetBuyerError.InsufficientAssetLiquidity) { const assetName = assetUtils.bestNameForAsset(asset, 'of this asset'); - if (error instanceof InsufficientAssetLiquidityError) { + if ( + error instanceof InsufficientAssetLiquidityError && + error.amountAvailableToFill && + error.amountAvailableToFill.greaterThan(BIG_NUMBER_ZERO) + ) { const unitAmountAvailableToFill = Web3Wrapper.toUnitAmount( error.amountAvailableToFill, asset.metaData.decimals, |