@@ -34,23 +34,23 @@ describe('Blockchain', () => {
3434
3535 it ( 'allows waiting for finalization' , async ( ) => {
3636 api . __setDefaultResult ( { isFinalized : true } )
37- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
37+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
3838 expect (
3939 await signAndSubmitTx ( tx , pair , { resolveOn : IS_FINALIZED } )
4040 ) . toHaveProperty ( 'isFinalized' , true )
4141 } )
4242
4343 it ( 'allows waiting for in block' , async ( ) => {
4444 api . __setDefaultResult ( { isInBlock : true } )
45- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
45+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
4646 expect (
4747 await signAndSubmitTx ( tx , pair , { resolveOn : IS_IN_BLOCK } )
4848 ) . toHaveProperty ( 'isInBlock' , true )
4949 } )
5050
5151 it ( 'allows waiting for ready' , async ( ) => {
5252 api . __setDefaultResult ( { isReady : true } )
53- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
53+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
5454 expect (
5555 await signAndSubmitTx ( tx , pair , { resolveOn : IS_READY } )
5656 ) . toHaveProperty ( 'status.isReady' , true )
@@ -59,20 +59,20 @@ describe('Blockchain', () => {
5959 it ( 'uses default resolution config' , async ( ) => {
6060 api . __setDefaultResult ( { isReady : true } )
6161 ConfigService . set ( { submitTxResolveOn : IS_READY } )
62- let tx = api . tx . balances . transfer ( 'abcdef' , 50 )
62+ let tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
6363 expect ( await signAndSubmitTx ( tx , pair ) ) . toHaveProperty (
6464 'status.isReady' ,
6565 true
6666 )
6767
6868 api . __setDefaultResult ( { isInBlock : true } )
6969 ConfigService . set ( { submitTxResolveOn : IS_IN_BLOCK } )
70- tx = api . tx . balances . transfer ( 'abcdef' , 50 )
70+ tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
7171 expect ( await signAndSubmitTx ( tx , pair ) ) . toHaveProperty ( 'isInBlock' , true )
7272
7373 api . __setDefaultResult ( { isFinalized : true } )
7474 ConfigService . set ( { submitTxResolveOn : IS_FINALIZED } )
75- tx = api . tx . balances . transfer ( 'abcdef' , 50 )
75+ tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
7676 expect ( await signAndSubmitTx ( tx , pair ) ) . toHaveProperty (
7777 'isFinalized' ,
7878 true
@@ -81,7 +81,7 @@ describe('Blockchain', () => {
8181
8282 it ( 'rejects on error condition' , async ( ) => {
8383 api . __setDefaultResult ( { isInvalid : true } )
84- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
84+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
8585 await expect (
8686 signAndSubmitTx ( tx , pair , { resolveOn : IS_FINALIZED } )
8787 ) . rejects . toHaveProperty ( 'isError' , true )
@@ -90,7 +90,7 @@ describe('Blockchain', () => {
9090 it ( 'throws if subscriptions not supported' , async ( ) => {
9191 // @ts -ignore
9292 api . hasSubscriptions = false
93- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
93+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
9494 await expect (
9595 signAndSubmitTx ( tx , pair , { resolveOn : IS_FINALIZED } )
9696 ) . rejects . toThrow ( SDKErrors . SubscriptionsNotSupportedError )
@@ -102,7 +102,7 @@ describe('Blockchain', () => {
102102 // mock disconnect 500 ms after submission
103103 if ( ev === 'disconnected' ) setTimeout ( callback , 500 )
104104 } )
105- const tx = api . tx . balances . transfer ( 'abcdef' , 50 )
105+ const tx = api . tx . balances . transferAllowDeath ( 'abcdef' , 50 )
106106 await expect (
107107 signAndSubmitTx ( tx , pair , { resolveOn : IS_FINALIZED } )
108108 ) . rejects . toHaveProperty ( 'internalError' , expect . any ( Error ) )
0 commit comments