greymag / tinkoff-invest-openapi-dart-sdk

Tinkoff Invest OpenAPI SDK for Dart.
BSD 3-Clause "New" or "Revised" License
10 stars 3 forks source link

Exception: Null check operator used on a null value #2

Closed QiXi closed 3 years ago

QiXi commented 3 years ago

version: tinkoff_invest: ^0.1.0+1 debug: true https://github.com/greymag/tinkoff-invest-openapi-dart-sdk/blob/d230e98c00fb6cc94f8b73929c68e0f99418cfe4/lib/src/models/streaming/streaming_trade_status.dart#L47

...
[streaming] Event: {"payload":{"figi":"BBG004730N88","trade_status":"opening_auction","min_price_increment":0.01,"lot":10},"event":"instrument_info","time":"2021-08-06T16:00:03.178466459Z"}
...
Unhandled exception:
Null check operator used on a null value
#0      StreamingTradeStatusConverter.convert (package:tinkoff_invest/src/models/streaming/streaming_trade_status.dart:47:61)
#1      StreamingTradeStatusConverter.fromJson (package:tinkoff_invest/src/models/streaming/streaming_trade_status.dart:51:7)
#2      StreamingTradeStatusFromJsonExtension.requireStreamingTradeStatus (package:tinkoff_invest/src/models/streaming/streaming_trade_status.dart:64:45)
#3      new StreamingInstrumentInfo.fromJson (package:tinkoff_invest/src/models/streaming/streaming_instrument_info.dart:40:11)
#4      new StreamingInstrumentInfoEvent.fromJson (package:tinkoff_invest/src/models/event/streaming_instrument_info_event.dart:15:33)
#5      TIInstrumentInfoStreamingImpl.fromMap (package:tinkoff_invest/src/streaming/ti_instrument_info_streaming.dart:62:36)
#6      TIStreamingChannelImpl.eventReceived (package:tinkoff_invest/src/streaming/ti_streaming_channel.dart:33:21)
#7      TIStreamingImpl._onEvent.<anonymous closure> (package:tinkoff_invest/src/streaming/ti_streaming.dart:111:48)
...
greymag commented 3 years ago

Thanks, I'll fix it ASAP.

greymag commented 3 years ago

Fixed in 0.1.0+2