@sip-protocol/sdk 0.2.4 → 0.2.5
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/browser.js +7 -0
- package/dist/browser.mjs +1 -1
- package/dist/chunk-MR7HRCRS.mjs +10165 -0
- package/dist/index.js +7 -0
- package/dist/index.mjs +1 -1
- package/package.json +1 -1
- package/src/sip.ts +10 -0
package/dist/browser.js
CHANGED
|
@@ -2966,6 +2966,13 @@ var SIP = class {
|
|
|
2966
2966
|
senderAddress ?? this.wallet?.address
|
|
2967
2967
|
);
|
|
2968
2968
|
const rawQuote = await this.intentsAdapter.getQuote(prepared);
|
|
2969
|
+
if (!rawQuote.amountOut || !rawQuote.amountIn) {
|
|
2970
|
+
throw new ValidationError(
|
|
2971
|
+
`Invalid quote response from 1Click API: missing ${!rawQuote.amountOut ? "amountOut" : "amountIn"}. This may indicate the trading pair is not supported or the amount is too small.`,
|
|
2972
|
+
"quote",
|
|
2973
|
+
{ rawQuote }
|
|
2974
|
+
);
|
|
2975
|
+
}
|
|
2969
2976
|
this.pendingSwaps.set(requestId, {
|
|
2970
2977
|
depositAddress: rawQuote.depositAddress,
|
|
2971
2978
|
quote: rawQuote
|