Skip to content

Bitte Wallet signMessage() via near-wallet-selector doesn't redirect to the window that launched it after user signs message #7

@RyanSept

Description

@RyanSept

Hi,

I'm currently using the Bitte wallet in my react vite application and signMessage() opens up to Bitte wallet as expected but after the user signs the message, it redirects back to the callback URL on the same pop up window instead of closing the popup and going back to the original window. The other wallets behave correctly and do close the popup.

Any ideas what might cause this and how best to fix it?

This is my env.

"@near-wallet-selector/bitte-wallet": "^9.0.1",
"react": "^18.3.1",

Illustration:

  1. Sign message
const { walletSelector } = useWalletSelector();
const wallet = await walletSelector.wallet(walletId);
const messageToSign = {
    message: "Welcome to Peerfolio",
    nonce: ...,
    recipient: xxx.near,
    callbackUrl: "https://ft-core.pages.dev/app-login",
  }
wallet.signMessage(messageToSign);
Image

https://wallet.bitte.ai/sign-message?message=Welcome+to+Peerfolio%21&nonce=MDAwMTc1MDA4ODA4NTk1OYE7Mgrv%2BZR0SASLWAkmF90%3D&recipient=xxx.near&callbackUrl=https%3A%2F%2Fft-core.pages.dev%2Fapp-login
Image

  1. Doesn't close the popup window/tab and this leaves the user with two windows open
    Image

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions