@rango-dev/provider-walletconnect-2 0.20.1-next.2 → 0.21.1-next.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/helpers.d.ts +7 -1
- package/dist/helpers.d.ts.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/session.d.ts +9 -18
- package/dist/session.d.ts.map +1 -1
- package/dist/signers/evm.d.ts.map +1 -1
- package/dist/types.d.ts +0 -1
- package/dist/types.d.ts.map +1 -1
- package/package.json +12 -11
- package/src/helpers.ts +37 -81
- package/src/index.ts +43 -46
- package/src/session.ts +44 -107
- package/src/signers/evm.ts +6 -0
- package/src/types.ts +0 -1
package/src/signers/evm.ts
CHANGED
|
@@ -116,6 +116,12 @@ class EVMSigner implements GenericSigner<EvmTransaction> {
|
|
|
116
116
|
params: [transaction],
|
|
117
117
|
},
|
|
118
118
|
});
|
|
119
|
+
// Some wallets e.g. Rainbow wallet are returning invalid hash (e.g. 'null') in case of the rejection
|
|
120
|
+
if (!hash?.startsWith('0x')) {
|
|
121
|
+
throw new Error(
|
|
122
|
+
`Received an invalid hash on signing the transaction. (hash=${hash})`
|
|
123
|
+
);
|
|
124
|
+
}
|
|
119
125
|
return {
|
|
120
126
|
hash,
|
|
121
127
|
};
|