Skip to content

1.3.5

Latest
Compare
Choose a tag to compare
@yasincaliskan yasincaliskan released this 10 Oct 06:36
92659d7

What's Changed

New

  • Added the isPeraDiscoverBrowser flag to enable auto-connection in the Pera Discover Browser. This flag checks if the app is opened in the Pera Discover Browser and returns a boolean.
Before
<button onClick={handleClickConnectWallet}>Connect wallet</button>

function handleClickConnectWallet() {
  openWalletOptions();
  // Display wallet options
}
After
<button onClick={handleClickConnectWallet}>Connect wallet</button>

async function handleClickConnectWallet() {
  if (peraWallet.isPeraDiscoverBrowser) {
    const accounts = await peraWallet.connect();
    // Handle connection success
  } else {
    openWalletOptions();
    // Display wallet options
  }
}