mirror of
https://github.com/pezkuwichain/pwap.git
synced 2026-06-19 11:51:01 +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.');
|
throw new Error('WalletConnect session expired. Please reconnect your wallet.');
|
||||||
}
|
}
|
||||||
|
|
||||||
const wcAccount = `polkadot:${defaultChainId.split(':')[1]}:${address}`;
|
|
||||||
const id = ++requestId;
|
const id = ++requestId;
|
||||||
|
|
||||||
const result = await signClient.request<{ signature: string }>({
|
const result = await signClient.request<{ signature: string }>({
|
||||||
@@ -268,7 +267,7 @@ export function createWCSigner(defaultGenesisHash: string, address: string) {
|
|||||||
request: {
|
request: {
|
||||||
method: 'polkadot_signMessage',
|
method: 'polkadot_signMessage',
|
||||||
params: {
|
params: {
|
||||||
address: wcAccount,
|
address: address,
|
||||||
message: raw.data,
|
message: raw.data,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|||||||
Reference in New Issue
Block a user