@tonconnect/ui-react
Advanced tools
Comparing version
@@ -50,2 +50,6 @@ import { ReactNode } from 'react'; | ||
/** | ||
* Preferred features for wallets to be displayed in the connect wallet modal. | ||
*/ | ||
walletsPreferredFeatures?: RequiredFeatures; | ||
/** | ||
* Configuration for action-period (e.g. sendTransaction) UI elements: modals and notifications and wallet behaviour (return strategy). | ||
@@ -52,0 +56,0 @@ */ |
{ | ||
"name": "@tonconnect/ui-react", | ||
"version": "2.1.1-beta.0", | ||
"version": "2.2.0-beta.0", | ||
"scripts": { | ||
@@ -55,3 +55,3 @@ "dev": "vite", | ||
"dependencies": { | ||
"@tonconnect/ui": "2.1.1-beta.0" | ||
"@tonconnect/ui": "2.2.0-beta.0" | ||
}, | ||
@@ -58,0 +58,0 @@ "peerDependencies": { |
@@ -61,2 +61,20 @@ # TON Connect UI React | ||
You can also specify preferred wallet features to prioritize wallets that will be displayed first in the connect wallet modal, without excluding others: | ||
```tsx | ||
<TonConnectUIProvider | ||
manifestUrl="https://<YOUR_APP_URL>/tonconnect-manifest.json" | ||
walletsPreferredFeatures={{ | ||
sendTransaction: { | ||
minMessages: 2, // Wallets supporting at least 2 messages are prioritized | ||
extraCurrencyRequired: true // Wallets supporting extra currency are prioritized | ||
} | ||
}} | ||
> | ||
{ /* Your app */ } | ||
</TonConnectUIProvider> | ||
``` | ||
This will gently recommend wallets with richer functionality by placing them higher in the list, but all wallets remain available for selection. | ||
## Add TonConnect Button | ||
@@ -63,0 +81,0 @@ TonConnect Button is universal UI component for initializing connection. After wallet is connected it transforms to a wallet menu. |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
70633
1.67%481
0.84%406
4.64%+ Added
+ Added
- Removed
- Removed
Updated