useWaitForWalletCreation hook polls until wallet creation completes. Use it as part of a custom auth flow after useWaitForSignup resolves.
Hook that polls until wallet creation is complete
useWaitForWalletCreation hook polls until wallet creation completes. Use it as part of a custom auth flow after useWaitForSignup resolves.
import { useWaitForWalletCreation } from "@getpara/react-native-wallet";
import { useWaitForWalletCreation } from "@getpara/react-native-wallet";
function WaitingForWallet() {
const { waitForWalletCreationAsync, isPending } = useWaitForWalletCreation();
const handleWait = async () => {
try {
const result = await waitForWalletCreationAsync({});
console.log("Wallet IDs:", result.walletIds);
} catch (err) {
console.error(err);
}
};
return <Button title={isPending ? "Creating wallets..." : "Check Wallet Status"} onPress={handleWait} disabled={isPending} />;
}