@liquidium/client 0.6.0-rc.0 → 0.6.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +16 -0
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +16 -0
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -4177,6 +4177,12 @@ var SupplyFlowExecutor = class {
|
|
|
4177
4177
|
});
|
|
4178
4178
|
}
|
|
4179
4179
|
case Chain.ETH: {
|
|
4180
|
+
if (params.amount > MAX_UINT256) {
|
|
4181
|
+
throw new LiquidiumError(
|
|
4182
|
+
LiquidiumErrorCode.VALIDATION_ERROR,
|
|
4183
|
+
"ETH transfer amount exceeds uint256 maximum"
|
|
4184
|
+
);
|
|
4185
|
+
}
|
|
4180
4186
|
if (!params.walletAdapter.sendEthTransaction) {
|
|
4181
4187
|
throw new LiquidiumError(
|
|
4182
4188
|
LiquidiumErrorCode.VALIDATION_ERROR,
|
|
@@ -6864,6 +6870,16 @@ function validateCreateRequest(request) {
|
|
|
6864
6870
|
"Simple loan collateral amount must be greater than zero"
|
|
6865
6871
|
);
|
|
6866
6872
|
}
|
|
6873
|
+
const collateralMinimumError = getDepositAmountMinimumValidationError({
|
|
6874
|
+
amount: request.collateral.amount,
|
|
6875
|
+
asset: request.collateral.asset
|
|
6876
|
+
});
|
|
6877
|
+
if (collateralMinimumError) {
|
|
6878
|
+
throw new LiquidiumError(
|
|
6879
|
+
LiquidiumErrorCode.VALIDATION_ERROR,
|
|
6880
|
+
collateralMinimumError.message
|
|
6881
|
+
);
|
|
6882
|
+
}
|
|
6867
6883
|
if (request.borrow.amount <= 0n) {
|
|
6868
6884
|
throw new LiquidiumError(
|
|
6869
6885
|
LiquidiumErrorCode.VALIDATION_ERROR,
|