Skip to content
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

Feature/dapp adapt to arbitrum #3056

Closed

Conversation

weilbith
Copy link
Contributor

Thank you for submitting this pull request :)

Fixes #3051 and #3053

Short description

I tackled both issues together, because only one of them would cause issues in the CI pipeline. Due to the underlying breaking changes of the SDK the dApp does not build properly without both changes together. As both issues are small enough, this should be fine.

Targets the arbitrum branch with the changes of the SDK.

Definition of Done

  • Steps to manually test the change have been documented
  • Acceptance criteria are met
  • Change has been manually tested by the reviewer (dApp)

Steps to manually test the change (dApp)

  1. Build the dApp successfully
  2. Close a channel and verify that the button changes to settle but is disabled and no block countdown
  3. Plan a withdrawal form the UDC and verify that is displays the date when it becomes ready, verify after the date passes it shows green

andrevmatos and others added 12 commits February 3, 2022 12:42
The former is a cached getter function to fetch the timestamp (in
millis) for a specific blockNumber, and the later is a cold cached
(shareReplay'd) observable to fetch the contract's constant
settleTimeout
fetches from Raiden.settleTimeout getter
In the past, channels had a settle timeout property. It was also possible to
configure the SDK with a settle timeout value for new channels. This has changed
with the latest version of the contracts and SDK. The settle timeout has moved
from individual channels to the token network itself. In result channel data
structure have no more this data field and the SDK doesn't accept this
configuration option anymore.
There is also a visual effect of this change. So far, if a channel got closed,
the button to settle the channel was showing a countdown until it becomes
possible. But not only was the settle timeout moved, it also changed its meaning
from a block number based value to an actual time value in seconds. The issue is
that this value can very from a few seconds to multiple days. In result is is
not easy to maintain a countdown on the settle button. Also because the
rendering of the Vue component would need to be force updated by an interval as
it is now purely time based. To maintain the raw functionality for the moment,
the button just remains disabled until the channel is settlable. This might
improve in future again.
In the past, a planned UDC withdrawal had the property of a target `withdrawBlock`
from which it is possible to withdraw the tokens. This has changed to a timestamp
value (in Unix format) called `withdrawableAfter`. Due to this change, a couple
of renaming where necessary.
Furthermore this also has visual effects. On the view to the user deposit
contract, if there was a planned withdraw pending (not yet withdrawable) it was
showing a countdown for the blocks remaining. As this is not the case anymore,
it has been changed to display the target date. Once this date has passed, the
UI changes as usual and displays the user that the plan is now ready.

There was also a tiny change in the translations, not only according block to
time change. Also a special unicode character got replaced with a simple ASCII
one, as the former one was not rendered properly for some users, depending on
their system font.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

dApp - adapt UDC withdrawal information to timestamps
2 participants