@silentswap/react 0.0.70 → 0.0.72
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.
|
@@ -428,7 +428,8 @@ export function useQuoteCalculation({ address, evmAddress, wallet, depositorAddr
|
|
|
428
428
|
});
|
|
429
429
|
// Always reset loading state on error to prevent UI freezing
|
|
430
430
|
setLoadingAmounts(false);
|
|
431
|
-
|
|
431
|
+
// Rethrow so executeSwap can show the real error (e.g. "Insufficient funds")
|
|
432
|
+
throw error;
|
|
432
433
|
}
|
|
433
434
|
finally {
|
|
434
435
|
// Always ensure loading state is reset (safety net)
|
|
@@ -283,8 +283,8 @@ export function useSilentQuote({ client, address, evmAddress, solAddress, wallet
|
|
|
283
283
|
stack: error.stack,
|
|
284
284
|
});
|
|
285
285
|
setError(error);
|
|
286
|
-
//
|
|
287
|
-
|
|
286
|
+
// Rethrow so caller (e.g. hidden-swap) can show the error (e.g. "Insufficient funds")
|
|
287
|
+
throw error;
|
|
288
288
|
}
|
|
289
289
|
finally {
|
|
290
290
|
setIsSwapping(false);
|
|
@@ -5,11 +5,6 @@ import type { AssetInfo } from '@silentswap/sdk';
|
|
|
5
5
|
*/
|
|
6
6
|
export declare function formatUsdValue(value: number | string | null): string | null;
|
|
7
7
|
export declare function formatUSD(amount: string | number): string;
|
|
8
|
-
/**
|
|
9
|
-
* Format price for display (e.g., "1 ETH = $2,500.00")
|
|
10
|
-
* Uses comma as decimal separator
|
|
11
|
-
*/
|
|
12
|
-
export declare function formatPrice(price: number): string;
|
|
13
8
|
/**
|
|
14
9
|
* Format balance for display using asset decimals and precision
|
|
15
10
|
*/
|
package/dist/utils/formatters.js
CHANGED
|
@@ -26,13 +26,6 @@ export function formatUSD(amount) {
|
|
|
26
26
|
minimumFractionDigits: 0,
|
|
27
27
|
}).format(numAmount);
|
|
28
28
|
}
|
|
29
|
-
/**
|
|
30
|
-
* Format price for display (e.g., "1 ETH = $2,500.00")
|
|
31
|
-
* Uses comma as decimal separator
|
|
32
|
-
*/
|
|
33
|
-
export function formatPrice(price) {
|
|
34
|
-
return price.toFixed(2).replace('.', ',');
|
|
35
|
-
}
|
|
36
29
|
/**
|
|
37
30
|
* Format balance for display using asset decimals and precision
|
|
38
31
|
*/
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@silentswap/react",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.0.
|
|
4
|
+
"version": "0.0.72",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"main": "dist/index.js",
|
|
7
7
|
"types": "dist/index.d.ts",
|
|
@@ -24,8 +24,8 @@
|
|
|
24
24
|
"dependencies": {
|
|
25
25
|
"@bigmi/core": "^0.6.5",
|
|
26
26
|
"@ensdomains/ensjs": "^4.2.0",
|
|
27
|
-
"@silentswap/sdk": "0.0.
|
|
28
|
-
"@silentswap/ui-kit": "0.0.
|
|
27
|
+
"@silentswap/sdk": "0.0.72",
|
|
28
|
+
"@silentswap/ui-kit": "0.0.72",
|
|
29
29
|
"@solana/codecs-strings": "^5.1.0",
|
|
30
30
|
"@solana/kit": "^5.1.0",
|
|
31
31
|
"@solana/rpc": "^5.1.0",
|