mirror of
https://github.com/Such-Software/hash-wallet.git
synced 2026-12-01 12:04:21 +01:00
Disable Jupiter limits for non-solana swaps (#2880)
* Disable Jupiter limits for non-solana swaps Fix zcash restore from QR Fix Android build with zkool * remove print [skip ci] * update versions [skip ci]
This commit is contained in:
@@ -81,16 +81,17 @@ class JupiterExchangeProvider extends ExchangeProvider {
|
||||
required CryptoCurrency to,
|
||||
required bool isFixedRateMode,
|
||||
}) async {
|
||||
try {
|
||||
// The Ultra Swap API doesn't have a dedicated limits endpoint
|
||||
// The /order endpoint validates amounts and returns error codes:
|
||||
// - errorCode 1: Insufficient funds
|
||||
// - errorCode 2: Top up SOL for gas
|
||||
// - errorCode 3: Minimum amount for gasless
|
||||
// The Ultra Swap API doesn't have a dedicated limits endpoint
|
||||
// The /order endpoint validates amounts and returns error codes:
|
||||
// - errorCode 1: Insufficient funds
|
||||
// - errorCode 2: Top up SOL for gas
|
||||
// - errorCode 3: Minimum amount for gasless
|
||||
|
||||
// only return null for supported currencies
|
||||
if (_supportedCurrencies.contains(from) && _supportedCurrencies.contains(to)) {
|
||||
return Limits(min: null, max: null);
|
||||
} catch (e) {
|
||||
printV('fetchLimits error: $e');
|
||||
throw Exception('Error fetching limits: $e');
|
||||
} else {
|
||||
throw Exception('not supported');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user