-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: subscribing on wallets #44
Conversation
@@ -197,8 +197,6 @@ mixin TonWalletRepositoryImpl implements TonWalletRepository { | |||
unsubscribe(asset.address); | |||
} | |||
|
|||
lastUpdatedAssets = assets; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you don't updatelastUpdatedAssets
, then you mustn't use last != null
expression. Imho, it's better to remove lastUpdatedAssets
, trying to use wallets
for all checks. Look through the same behaviour in TokenWalletrepositoryImpl
@@ -225,15 +211,21 @@ mixin TonWalletRepositoryImpl implements TonWalletRepository { | |||
|
|||
@override | |||
Future<void> updateTransportSubscriptions() async { | |||
closeAllSubscriptions(); | |||
final assets = wallets |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think, this place is a bottle neck, because if you change transport until all subscriptions were completed, you will lose some part of wallets, so imho for this place you must use some cache list as it was lastUpdatedAddress
and you won't lose necessary wallets. But lastUpdatedAddress
must be used only here, so when you will revert this, leave a comment with description.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also waiting for TokenWalletRepositoryImpl
with the same logic
Closed, because this logic implemented in #53 |
No description provided.