File tree Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Expand file tree Collapse file tree 1 file changed +32
-0
lines changed Original file line number Diff line number Diff line change @@ -40,6 +40,24 @@ export function App() {
40
40
41
41
```
42
42
43
+ You can also specify required wallet features to filter wallets that will be displayed in the connect wallet modal:
44
+
45
+ ``` tsx
46
+ <TonConnectUIProvider
47
+ manifestUrl = " https://<YOUR_APP_URL>/tonconnect-manifest.json"
48
+ walletsRequiredFeatures = { {
49
+ sendTransaction: {
50
+ minMessages: 2 , // Wallet must support at least 2 messages
51
+ extraCurrencyRequired: true // Wallet must support extra currency
52
+ }
53
+ }}
54
+ >
55
+ { /* Your app */ }
56
+ </TonConnectUIProvider >
57
+ ```
58
+
59
+ This will only display wallets that support sending at least 2 messages and support extra currencies in transactions.
60
+
43
61
## Add TonConnect Button
44
62
TonConnect Button is universal UI component for initializing connection. After wallet is connected it transforms to a wallet menu.
45
63
It is recommended to place it in the top right corner of your app.
@@ -161,6 +179,20 @@ export const Settings = () => {
161
179
]
162
180
}
163
181
182
+ // Example with extra currency support
183
+ const transactionWithExtraCurrency = {
184
+ validUntil: Math .floor (Date .now () / 1000 ) + 60 ,
185
+ messages: [
186
+ {
187
+ address: " EQBBJBB3HagsujBqVfqeDUPJ0kXjgTPLWPFFffuNXNiJL0aA" ,
188
+ // Specify the extra currency
189
+ extraCurrency: {
190
+ 100 : " 10000000"
191
+ }
192
+ }
193
+ ]
194
+ }
195
+
164
196
return (
165
197
<div >
166
198
<button onClick = { () => tonConnectUI .sendTransaction (myTransaction )} >
You can’t perform that action at this time.
0 commit comments