@@ -52,14 +52,14 @@ const returnsTxnObject = async (t, { method, params = {} }) => {
5252returnsTxnObject . title = ( providedTitle = '' , input ) => `Successfully calls ${ input . method } and returns valid txn object`
5353
5454const returnsTxnObjects = async ( t , { method } ) => {
55- const { records : transactions } = await t . context . web3data . transaction [ method ] ( )
55+ const transactions = await t . context . web3data . transaction [ method ] ( )
5656 t . true ( transactions [ 0 ] . hasProp ( 'hash' ) )
5757 t . true ( transactions . length > 0 )
5858}
5959returnsTxnObjects . title = ( providedTitle = '' , input ) => `Successfully calls ${ input . method } and returns array of valid txn objects`
6060
6161const returnsPendingTxnObjects = async ( t , { method } ) => {
62- const { records : [ pendingTxn ] } = await t . context . web3data . transaction [ method ] ( )
62+ const [ pendingTxn ] = await t . context . web3data . transaction [ method ] ( )
6363
6464 t . is ( pendingTxn . statusResult . name , 'pending' )
6565}
@@ -73,11 +73,11 @@ test([returnsTxnObjects, returnsPendingTxnObjects], {method:'getPendingTransacti
7373
7474/*********** Test getTransactions() ***********/
7575test ( 'Successfully calls getTransactions' , async t => {
76- const { records : [ txn ] } = await t . context . web3data . transaction . getTransactions ( )
76+ const [ txn ] = await t . context . web3data . transaction . getTransactions ( )
7777 t . true ( txn . hasProp ( 'hash' ) )
7878} )
7979test ( 'Successfully calls getTransactions - with filters' , async t => {
80- const { records : [ pendingTxn ] } = await t . context . web3data . transaction . getTransactions ( { status : 'pending' } )
80+ const [ pendingTxn ] = await t . context . web3data . transaction . getTransactions ( { status : 'pending' } )
8181 t . true ( pendingTxn . hasProp ( 'statusResult' ) )
8282 t . true ( pendingTxn . statusResult . hasProp ( 'name' ) )
8383 t . is ( pendingTxn . statusResult . name , 'pending' )
@@ -96,7 +96,7 @@ test('Successfully calls getTransaction - with filters', async t => {
9696
9797/*********** Test getPendingTransactions() ***********/
9898test ( 'Successfully calls getPendingTransactions' , async t => {
99- const { records : [ pendingTxn ] } = await t . context . web3data . transaction . getPendingTransactions ( )
99+ const [ pendingTxn ] = await t . context . web3data . transaction . getPendingTransactions ( )
100100 t . true ( pendingTxn . hasProp ( 'statusResult' ) )
101101 t . true ( pendingTxn . statusResult . hasProp ( 'name' ) )
102102 t . is ( pendingTxn . statusResult . name , 'pending' )
0 commit comments