@@ -1415,7 +1415,7 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1415
1415
vi . spyOn ( global , 'fetch' ) . mockImplementationOnce ( ( ) => {
1416
1416
const responseObject = {
1417
1417
data : {
1418
- submitAndAwait : {
1418
+ submitAndAwaitStatus : {
1419
1419
type : 'SuccessStatus' ,
1420
1420
time : 'data: 4611686020137152060' ,
1421
1421
} ,
@@ -1436,11 +1436,11 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1436
1436
) ;
1437
1437
} ) ;
1438
1438
1439
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1439
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1440
1440
encodedTransaction : "it's mocked so doesn't matter" ,
1441
1441
} ) ) {
1442
- expect ( submitAndAwait . type ) . toEqual ( 'SuccessStatus' ) ;
1443
- expect ( ( < SubmittedStatus > submitAndAwait ) . time ) . toEqual ( 'data: 4611686020137152060' ) ;
1442
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SuccessStatus' ) ;
1443
+ expect ( ( < SubmittedStatus > submitAndAwaitStatus ) . time ) . toEqual ( 'data: 4611686020137152060' ) ;
1444
1444
}
1445
1445
} ) ;
1446
1446
@@ -1455,11 +1455,11 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1455
1455
const encoder = new TextEncoder ( ) ;
1456
1456
1457
1457
controller . enqueue (
1458
- encoder . encode ( `data:${ JSON . stringify ( { data : { submitAndAwait : { a : 0 } } } ) } \n\n` )
1458
+ encoder . encode ( `data:${ JSON . stringify ( { data : { submitAndAwaitStatus : { a : 0 } } } ) } \n\n` )
1459
1459
) ;
1460
1460
controller . enqueue ( encoder . encode ( ':keep-alive-text\n\n' ) ) ;
1461
1461
controller . enqueue (
1462
- encoder . encode ( `data:${ JSON . stringify ( { data : { submitAndAwait : { a : 1 } } } ) } \n\n` )
1462
+ encoder . encode ( `data:${ JSON . stringify ( { data : { submitAndAwaitStatus : { a : 1 } } } ) } \n\n` )
1463
1463
) ;
1464
1464
controller . close ( ) ;
1465
1465
} ,
@@ -1468,7 +1468,7 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1468
1468
1469
1469
let numberOfEvents = 0 ;
1470
1470
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1471
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1471
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1472
1472
encodedTransaction : "it's mocked so doesn't matter" ,
1473
1473
} ) ) {
1474
1474
numberOfEvents += 1 ;
@@ -1484,14 +1484,14 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1484
1484
vi . spyOn ( global , 'fetch' ) . mockImplementationOnce ( ( ) => {
1485
1485
const event1 = {
1486
1486
data : {
1487
- submitAndAwait : {
1487
+ submitAndAwaitStatus : {
1488
1488
type : 'SubmittedStatus' ,
1489
1489
} ,
1490
1490
} ,
1491
1491
} ;
1492
1492
const event2 = {
1493
1493
data : {
1494
- submitAndAwait : {
1494
+ submitAndAwaitStatus : {
1495
1495
type : 'SuccessStatus' ,
1496
1496
} ,
1497
1497
} ,
@@ -1515,16 +1515,16 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1515
1515
1516
1516
let numberOfEvents = 0 ;
1517
1517
1518
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1518
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1519
1519
encodedTransaction : "it's mocked so doesn't matter" ,
1520
1520
} ) ) {
1521
1521
numberOfEvents += 1 ;
1522
1522
1523
1523
if ( numberOfEvents === 1 ) {
1524
- expect ( submitAndAwait . type ) . toEqual ( 'SubmittedStatus' ) ;
1524
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SubmittedStatus' ) ;
1525
1525
}
1526
1526
if ( numberOfEvents === 2 ) {
1527
- expect ( submitAndAwait . type ) . toEqual ( 'SuccessStatus' ) ;
1527
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SuccessStatus' ) ;
1528
1528
}
1529
1529
}
1530
1530
@@ -1537,7 +1537,7 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1537
1537
vi . spyOn ( global , 'fetch' ) . mockImplementationOnce ( ( ) => {
1538
1538
const responseObject = JSON . stringify ( {
1539
1539
data : {
1540
- submitAndAwait : {
1540
+ submitAndAwaitStatus : {
1541
1541
type : 'SuccessStatus' ,
1542
1542
} ,
1543
1543
} ,
@@ -1563,10 +1563,10 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1563
1563
) ;
1564
1564
} ) ;
1565
1565
1566
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1566
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1567
1567
encodedTransaction : "it's mocked so doesn't matter" ,
1568
1568
} ) ) {
1569
- expect ( submitAndAwait . type ) . toEqual ( 'SuccessStatus' ) ;
1569
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SuccessStatus' ) ;
1570
1570
}
1571
1571
} ) ;
1572
1572
@@ -1577,14 +1577,14 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1577
1577
vi . spyOn ( global , 'fetch' ) . mockImplementationOnce ( ( ) => {
1578
1578
const event1 = {
1579
1579
data : {
1580
- submitAndAwait : {
1580
+ submitAndAwaitStatus : {
1581
1581
type : 'SubmittedStatus' ,
1582
1582
} ,
1583
1583
} ,
1584
1584
} ;
1585
1585
const event2 = JSON . stringify ( {
1586
1586
data : {
1587
- submitAndAwait : {
1587
+ submitAndAwaitStatus : {
1588
1588
type : 'SuccessStatus' ,
1589
1589
} ,
1590
1590
} ,
@@ -1611,16 +1611,16 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1611
1611
1612
1612
let numberOfEvents = 0 ;
1613
1613
1614
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1614
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1615
1615
encodedTransaction : "it's mocked so doesn't matter" ,
1616
1616
} ) ) {
1617
1617
numberOfEvents += 1 ;
1618
1618
1619
1619
if ( numberOfEvents === 1 ) {
1620
- expect ( submitAndAwait . type ) . toEqual ( 'SubmittedStatus' ) ;
1620
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SubmittedStatus' ) ;
1621
1621
}
1622
1622
if ( numberOfEvents === 2 ) {
1623
- expect ( submitAndAwait . type ) . toEqual ( 'SuccessStatus' ) ;
1623
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SuccessStatus' ) ;
1624
1624
}
1625
1625
}
1626
1626
@@ -1634,14 +1634,14 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1634
1634
vi . spyOn ( global , 'fetch' ) . mockImplementationOnce ( ( ) => {
1635
1635
const event1 = JSON . stringify ( {
1636
1636
data : {
1637
- submitAndAwait : {
1637
+ submitAndAwaitStatus : {
1638
1638
type : 'SubmittedStatus' ,
1639
1639
} ,
1640
1640
} ,
1641
1641
} ) ;
1642
1642
const event2 = JSON . stringify ( {
1643
1643
data : {
1644
- submitAndAwait : {
1644
+ submitAndAwaitStatus : {
1645
1645
type : 'SuccessStatus' ,
1646
1646
} ,
1647
1647
} ,
@@ -1670,16 +1670,16 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1670
1670
1671
1671
let numberOfEvents = 0 ;
1672
1672
1673
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1673
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus ( {
1674
1674
encodedTransaction : "it's mocked so doesn't matter" ,
1675
1675
} ) ) {
1676
1676
numberOfEvents += 1 ;
1677
1677
1678
1678
if ( numberOfEvents === 1 ) {
1679
- expect ( submitAndAwait . type ) . toEqual ( 'SubmittedStatus' ) ;
1679
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SubmittedStatus' ) ;
1680
1680
}
1681
1681
if ( numberOfEvents === 2 ) {
1682
- expect ( submitAndAwait . type ) . toEqual ( 'SuccessStatus' ) ;
1682
+ expect ( submitAndAwaitStatus . type ) . toEqual ( 'SuccessStatus' ) ;
1683
1683
}
1684
1684
}
1685
1685
@@ -1708,9 +1708,11 @@ Supported fuel-core version: ${mock.supportedVersion}.`
1708
1708
await expectToThrowFuelError (
1709
1709
async ( ) => {
1710
1710
// eslint-disable-next-line @typescript-eslint/no-unused-vars
1711
- for await ( const { submitAndAwait } of await provider . operations . submitAndAwait ( {
1712
- encodedTransaction : "it's mocked so doesn't matter" ,
1713
- } ) ) {
1711
+ for await ( const { submitAndAwaitStatus } of await provider . operations . submitAndAwaitStatus (
1712
+ {
1713
+ encodedTransaction : "it's mocked so doesn't matter" ,
1714
+ }
1715
+ ) ) {
1714
1716
// shouldn't be reached!
1715
1717
expect ( true ) . toBeFalsy ( ) ;
1716
1718
}
0 commit comments