Skip to content

Documentation / expo / isNotCreated

Function: isNotCreated()

isNotCreated(s)

isNotCreated(s): s is EmbeddedWalletNotCreatedState

A type predicate to narrow the Embedded Wallet state to the Not Created state.

Parameters

s: EmbeddedWalletState

Returns

s is EmbeddedWalletNotCreatedState

Example

ts
import {useEmbeddedWallet, useEmbeddedSolanaWalet, isConnected} from '@privy-io/expo';

const wallet = useEmbeddedWallet();
/// OR
const wallet = useEmbeddedSolanaWallet();

{isNotCreated(wallet) && (
  <button onClick={() => wallet.create()}>Create Wallet</button>
)}

isNotCreated(s)

isNotCreated(s): s is EmbeddedSolanaWalletNotCreatedState

A type predicate to narrow the Embedded Wallet state to the Not Created state.

Parameters

s: EmbeddedSolanaWalletState

Returns

s is EmbeddedSolanaWalletNotCreatedState

Example

ts
import {useEmbeddedWallet, useEmbeddedSolanaWalet, isConnected} from '@privy-io/expo';

const wallet = useEmbeddedWallet();
/// OR
const wallet = useEmbeddedSolanaWallet();

{isNotCreated(wallet) && (
  <button onClick={() => wallet.create()}>Create Wallet</button>
)}