@@ -589,7 +589,7 @@ class Client {
589
589
/// - For example, instead of writing `.1` , the price should be written as `0.1` .
590
590
/// - **Correct format**: `0.1`
591
591
/// - **Incorrect format**: `.1`
592
- Future <SubmitTransactionResponse > createOrder (
592
+ Future <bool > createOrder (
593
593
{required String sellingAssetCode,
594
594
required String buyingAssetCode,
595
595
required String amount,
@@ -651,8 +651,9 @@ class Client {
651
651
await _sdk.submitTransaction (transaction);
652
652
if (! response.success) {
653
653
logger.e ('Transaction failed with result: ${response .resultXdr }' );
654
+ return false ;
654
655
}
655
- return response ;
656
+ return true ;
656
657
} catch (error) {
657
658
throw Exception ('Transaction failed due to: ${error .toString ()}' );
658
659
}
@@ -664,7 +665,7 @@ class Client {
664
665
///
665
666
/// **Note:** Cancelling an order requires having XLM in the account
666
667
/// to cover transaction fees and reserve requirements.
667
- Future <SubmitTransactionResponse > cancelOrder (
668
+ Future <bool > cancelOrder (
668
669
{required String sellingAssetCode,
669
670
required String buyingAssetCode,
670
671
required String offerId,
@@ -702,8 +703,9 @@ class Client {
702
703
await _sdk.submitTransaction (transaction);
703
704
if (! response.success) {
704
705
logger.e ('Transaction failed with result: ${response .resultXdr }' );
706
+ return false ;
705
707
}
706
- return response ;
708
+ return true ;
707
709
} catch (error) {
708
710
throw Exception ('Transaction failed due to: ${error .toString ()}' );
709
711
}
@@ -721,7 +723,7 @@ class Client {
721
723
/// - For example, instead of writing `.1` , the price should be written as `0.1` .
722
724
/// - **Correct format**: `0.1`
723
725
/// - **Incorrect format**: `.1`
724
- Future <SubmitTransactionResponse > updateOrder (
726
+ Future <bool > updateOrder (
725
727
{required String sellingAssetCode,
726
728
required String buyingAssetCode,
727
729
required String amount,
@@ -762,8 +764,9 @@ class Client {
762
764
await _sdk.submitTransaction (transaction);
763
765
if (! response.success) {
764
766
logger.e ('Transaction failed with result: ${response .resultXdr }' );
767
+ return false ;
765
768
}
766
- return response ;
769
+ return true ;
767
770
} catch (error) {
768
771
throw Exception ('Transaction failed due to: ${error .toString ()}' );
769
772
}
0 commit comments