Soneso / stellar_flutter_sdk

Stellar SDK for flutter - dart, Stellar, Horizon, Soneso
MIT License
71 stars 33 forks source link

Null check missing for SubmitTransactionResponseExtras field `result_xdr` #95

Open godilite opened 1 week ago

godilite commented 1 week ago

I made a ManageData operation and the response has a null check error, see stacktrace Version: 1.8.1

type 'Null' is not a subtype of type 'String' #0      new SubmitTransactionResponseExtras.fromJson (package:stellar_flutter_sdk/src/responses/submit_transaction_response.dart:272:15)
flutter: #1      new SubmitTransactionResponse.fromJson (package:stellar_flutter_sdk/src/responses/submit_transaction_response.dart:230:49)
flutter: #2      StellarSDK.submitTransactionEnvelopeXdrBase64.<anonymous closure> (package:stellar_flutter_sdk/src/stellar_sdk.dart:156:41)
flutter: #3      _rootRunUnary (dart:async/zone.dart:1407:47)
flutter: #4      _ZoneDelegate.runUnary (dart:async/zone.dart:959:19)
flutter: #5      AsyncAction._runUnary (package:mobx/src/api/async/async_action.dart:57:29)
flutter: #6      _CustomZone.runUnary (dart:async/zone.dart:1308:19)
flutter: <asynchronous suspension>
flutter: #7      StellarSDK.submitTransactionEnvelopeXdrBase64 (package:stellar_flutter_sdk/src/stellar_sdk.dart:147:40)
flutter: <asynchronous suspension>
flutter: #8      PostServiceImpl.saveAccountData (package:vote38/src/services/post_service.dart:119:9)
flutter: <asynchronous suspension>
flutter: #9      _CreatePostViewModel.submitPost (package:vote38/src/dashboard/view_model/create_post_view_model.dart:169:9)
flutter: <asynchronous suspension>
flutter: #10     AsyncAction.run (package:mobx/src/api/async/async_action.dart:28:14)
flutter: <asynchronous suspension>
flutter: #11     _CreatePostViewState.build.<anonymous closure>.<anonymous closure> (package:vote38/src/dashboard/view/create_post_view.dart:345:29)
flutter: <asynchronous suspension>
flutter:
flutter: Instance of 'ManageDataException'
christian-rogobete commented 1 week ago

Hello @godilite, thank you for adding this issue. Unfortunately I can not reproduce this behaviour. result_xdr should not be null. Can you pls. help me to reproduce it? What was the content of the operation? Do you have source code that can help me to reproduce it? Thx

christian-rogobete commented 1 day ago

Hello @godilite, do you still have this problem? Maybe it happened during a testnet reset? Thx