Skip to content

Wallet cannot receive dapp's request #136

Closed
@lvshaoping007

Description

@lvshaoping007

SDK Affected
reown_walletkit: 1.1.3

Both, i use reown_walletkit 1.1.3 and @walletconnect/sign-client 2.19.1

Describe the bug
The dapp can report the request message, but the wallet cannot receive the message.

To Reproduce

  1. Init wallet connect on the mobile browser,
  2. click connect,
  3. request wallet link through deeplink,
  4. back to browser and request signMessage through deeplink

Expected behavior

  1. The wallet debug log shows that the message can be received

Reproducible code

const client = await SignClient.init({
    projectId: "",
    metadata: {
      name: "xxxx",
      description: "xxxx",
      url: window.location.origin,
      icons: ["https://www.xxx.com/imgs/xx.png"],
    },
    logger:"error"
  });



  try {
      const paymentRequest = {
        topic: session.topic,
        chainId: selectedChain,

        request: {
          method: "signMessage",
          params: {
            from: account,
            message: "Hello, wallet",
          },
        },
      };
      const result = await client.request(paymentRequest);
_walletKit = ReownWalletKit(
      core: ReownCore(
        projectId: projectId,
        logLevel: LogLevel.all,
      ),
      metadata: const PairingMetadata(
        name: 'Wallet',
        description: 'xxx',
        url: 'https://www.xxx.com/',
        icons: ['https://www.xxx.com/imgs/aurxxo.png'],
        redirect: Redirect(
          native: 'demo://',
          universal: 'https://www.demo.com/applinks',
          linkMode: true,
        ),
      ),
    );

    _setupListeners();
    await _walletKit.init();


_walletKit.onSessionRequest.subscribe(onSessionRequest);

Smartphone (please complete the following information):

  • Device: xiaomi 14
  • Browser browser

Additional context
The connection request is work well , but nothing else works.
The same code fails most of the time, but sometimes it can receive a message, that is, the log of wallect connect in the wallet will print out the request content.
Trying to switch the project id doesn't work either.

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