-
Notifications
You must be signed in to change notification settings - Fork 29
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
Notify when receiving transfers gets disabled #1548
Conversation
@@ -111,6 +110,11 @@ export class Raiden { | |||
*/ | |||
public readonly transfers$: Observable<RaidenTransfer>; | |||
|
|||
/** RaidenConfig object */ | |||
public config!: RaidenConfig; |
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.
Should we provide a callback'ish way as well? I guess we haven't decided yet in #357
It's not multi step but same thing IMO
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.
Yes, I was thinking about it, I really want to standardize these interfaces, but didn't want to make this PR more complex, so just used the same pattern we already have for state$
, channels$
, transfers$
and so.. I'd say we should keep it like that for now, but I'm thinking on something like making Raiden
an EventEmitter
derived class and emitting these as events in a more interoperable way.
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.
Looks plausible to me overall
5814141
to
39f7eec
Compare
Codecov Report
@@ Coverage Diff @@
## master #1548 +/- ##
==========================================
- Coverage 96.11% 96.10% -0.01%
==========================================
Files 141 142 +1
Lines 5117 5138 +21
Branches 1004 954 -50
==========================================
+ Hits 4918 4938 +20
Misses 155 155
- Partials 44 45 +1
Continue to review full report at Codecov.
|
39f7eec
to
56dff7d
Compare
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.
Works like a charm, good job and thank you!
Fixes #1473
TODO: tests, changelog
Short description
A dialog is shown on any screen on dApp when/if SDK has Receiving transfers disabled. This can happen on startup or during runtime, for mainly a couple of reasons:
rateToSvt
config mapping is empty (it is by default, so receiving is disabled until it gets populated)monitoringReward
config isn't set (it is by default, as 5SVT)udcBalance
is not enough to pay monitoring reward (which can happen at startup or at runtime by a withdraw from service or user I want to withdraw tokens from the UDC contract #1421).Raiden.updateConfig({ caps: { noReceive: true } })
, which has priorityDefinition of Done
Steps to manually test the change (dApp)
raiden
SDK instance and enable receiving with:caps['noReceive']
is unset (auto), if UDC balance is emptied, if one setsmonitoringReward
config to something higher than UDC desposit orrateToSvt
is emptied