Skip to content

Commit 0a2f710

Browse files
committed
check when op_low_reserve error
1 parent 66b6d64 commit 0a2f710

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

packages/stellar_client/lib/src/client.dart

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -667,9 +667,14 @@ class Client {
667667
final SubmitTransactionResponse response =
668668
await _sdk.submitTransaction(transaction);
669669
if (!response.success) {
670+
if (response.extras!.resultCodes!.operationsResultCodes!
671+
.contains('op_low_reserve')) {
672+
throw Exception('Transaction failed due to low reserve.');
673+
}
670674
logger.e('Transaction failed with result: ${response.resultXdr}');
671675
return false;
672676
}
677+
673678
return true;
674679
} catch (error) {
675680
throw Exception('Transaction failed due to: ${error.toString()}');

0 commit comments

Comments
 (0)