@tonconnect/ui-react
Advanced tools
Comparing version 0.0.7 to 0.0.8
{ | ||
"name": "@tonconnect/ui-react", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"repository": { | ||
@@ -5,0 +5,0 @@ "type": "git", |
@@ -182,12 +182,13 @@ # TON Connect UI React | ||
```ts | ||
import {useEffect} from "react"; | ||
import {useTonConnectUI} from "@tonconnect/ui-react"; | ||
const wallet = useTonWallet(); | ||
const [tonConnectUI] = useTonConnectUI(); | ||
useEffect(() => { | ||
if (wallet && wallet.connectItems?.tonProof && 'proof' in wallet.connectItems.tonProof) { | ||
checkProofInYourBackend(wallet.connectItems.tonProof.proof); | ||
} | ||
}, [wallet]); | ||
useEffect(() => | ||
tonConnectUI.onStatusChange(wallet => { | ||
if (wallet.connectItems?.tonProof && 'proof' in wallet.connectItems.tonProof) { | ||
checkProofInYourBackend(wallet.connectItems.tonProof.proof, wallet.account); | ||
} | ||
}), []); | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2799185
194