-
Notifications
You must be signed in to change notification settings - Fork 19
Open
Description
Describe the bug
It is not possible to sign a message or transaction when connected to a Rainbow wallet. The Rainbow wallet is launched but it doesn't show a pop-up to sign a message or transaction. It might be that the WalletConnect session is stale as it usually happens a few hours (or a day) after connecting the wallet.
To Reproduce
Initialize the WalletConnect session
service = WalletConnectModalService(
projectId: AppDotEnv.walletConnectProjectId,
metadata: const PairingMetadata(
name: 'orb',
description: 'Everyday app for web3 social',
url: 'https://orb.ac/',
icons: ['https://i.ibb.co/w6sNHRC/launcher.png'],
redirect: Redirect(
native: 'orbapp://',
universal: 'https://orb.ac/',
),
),
recommendedWalletIds: {
WalletUtils.metaMaskWalletId,
WalletUtils.zerionWalletId,
WalletUtils.trustWalletId,
WalletUtils.rainbowWalletId,
WalletUtils.bitgetWalletId,
WalletUtils.imTokenWalletId,
WalletUtils.omniWalletId,
...
},
requiredNamespaces: {
'eip155': RequiredNamespace(
methods: [
'eth_sendTransaction',
'personal_sign',
'eth_sign',
'eth_signTypedData',
],
chains: ['eip155:137'],
events: [
'chainChanged',
'accountsChanged',
],
),
},
excludedWalletState: ExcludedWalletState.list,
);
service!.addListener(_onWalletUpdated);
await service!.init();Sign a message
Future<String?> signMessage({required String message}) async {
final web3App = service?.web3App;
final address = service?.address?.toLowerCase() ?? '';
final sessionData = web3App?.sessions.getAll().first;
if (sessionData != null) {
service?.launchCurrentWallet();
await web3App!.request(
topic: service!.session!.topic,
chainId: 'eip155:137', // Polygon
request: SessionRequestParams(
method: 'personal_sign',
params: [message, address],
),
);
}
}Expected behavior
A pop-up to sign a message should appear in the Rainbow wallet, after launching a wallet.
Videos
IMG_8150.MP4
Note: We use the above signMessage method when calling "Verify with Lens". Notice that the wallet is launched but there's no popup to sign a message.
nileshrathorequetool
Metadata
Metadata
Assignees
Labels
No labels