// We arbitraily select the first account returned from the above snippet
// `account` is of type InjectedAccountWithMeta
const account = allAccount[0];
// to be able to retrieve the signer interface from this account
// we can use web3FromSource which will return an InjectedExtension type
const injector = await web3FromSource(account.meta.source);
// this injector object has a signer and a signRaw method
// to be able to sign raw bytes
const signRaw = injector?.signer?.signRaw;
if (!!signRaw) {
// after making sure that signRaw is defined
// we can use it to sign our message
const { signature } = await signRaw({
account.address,
data: stringToHex('message to sign'),
type: 'bytes'
});
}
Within mobile app, there is no response from wallet.
Version & Environment
? (please fill in this field)
Behaviour and expectations
The behavior I expect is ...
message come to wallet, so wallet start UI interaction
Bug report
It looks like it is not possible to use this project for signing message
https://polkadot.js.org/docs/extension/cookbook/
When using snippet from the reference
Within mobile app, there is no response from wallet.
Version & Environment
?
(please fill in this field)Behaviour and expectations
The behavior I expect is ... message come to wallet, so wallet start UI interaction
Actual results (or Errors)
No effect, no response.