File tree Expand file tree Collapse file tree 1 file changed +25
-0
lines changed
Expand file tree Collapse file tree 1 file changed +25
-0
lines changed Original file line number Diff line number Diff line change @@ -255,5 +255,30 @@ describe('e2e', () => {
255255 expect ( metaTransactionFees . baseFee ) . to . equal ( '1' )
256256 } )
257257 } )
258+
259+ describe ( 'Error messages' , ( ) => {
260+ before ( async ( ) => {
261+ const walletData = await identityWallet . create ( )
262+ await identityWallet . loadFrom ( walletData )
263+ await identityWallet . deployIdentity ( )
264+ } )
265+
266+ it ( 'should get a detailed error message for invalid nonce' , async ( ) => {
267+ const rawTx : RawTxObject = {
268+ data : '0x' ,
269+ from : identityWallet . address ,
270+ nonce : 123456 ,
271+ to : identityWallet . address ,
272+ value : 0
273+ }
274+ try {
275+ await identityWallet . getMetaTxFees ( rawTx )
276+ } catch ( error ) {
277+ expect ( error . message ) . to . contain (
278+ 'Invalid (nonce, hash) pair for meta-tx'
279+ )
280+ }
281+ } )
282+ } )
258283 } )
259284} )
You can’t perform that action at this time.
0 commit comments