mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-04-22 02:07:55 +00:00
fix: send plain SS58 address in WC signRaw instead of CAIP-10
The signRaw handler was wrapping the address in CAIP-10 format (polkadot:<chain>:<address>) before sending to the wallet. The wallet expects a plain SS58 address in polkadot_signMessage params, causing InvalidChecksumException crash when trying to decode the CAIP-10 string.
This commit is contained in:
@@ -259,7 +259,6 @@ export function createWCSigner(defaultGenesisHash: string, address: string) {
|
||||
throw new Error('WalletConnect session expired. Please reconnect your wallet.');
|
||||
}
|
||||
|
||||
const wcAccount = `polkadot:${defaultChainId.split(':')[1]}:${address}`;
|
||||
const id = ++requestId;
|
||||
|
||||
const result = await signClient.request<{ signature: string }>({
|
||||
@@ -268,7 +267,7 @@ export function createWCSigner(defaultGenesisHash: string, address: string) {
|
||||
request: {
|
||||
method: 'polkadot_signMessage',
|
||||
params: {
|
||||
address: wcAccount,
|
||||
address: address,
|
||||
message: raw.data,
|
||||
},
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user