-
Notifications
You must be signed in to change notification settings - Fork 54
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
feat(orderbook): show fidelity bond value and locktime #766
Conversation
06256a8
to
da316fd
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.
Altogether the changes look good. Definitely able to merge.
@@ -102,6 +103,10 @@ interface OrderTableEntry { | |||
bondValue: { | |||
value: number | |||
displayValue: string // example: "0" (no fb) or "114557102085.28133" | |||
locktime?: number |
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.
This part looks fine! Should amount also be explicitly converted to string?
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.
Hmm.. I think I know what you mean.. amount
is passed as String
to the Balance
component. I think I'd rather want to have the type info in the object rather than storing it as plain string here. Okay for you?
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.
It might take some time before the bond value appears - it worked for me after refreshing a couple of seconds later. Can you try it again? 🙏 Edit: There is a message "It might take some time for your offer and your bond to appear in your local orderbook." but it is not displayed, when your own offer is already included in the orderbook. Maybe it should be shown till offer and bond (if the user holds a bond) are displayed? |
It got displayed but its value is 0. |
Have you waited a couple of seconds and refreshed once or twice? |
are you asking me to wait after creating FB but before start earning? |
No, wait a little bit after you started the maker and the offers appears in the orderbook while the bond value is zero. Refresh the orderbook from time to time. The bond value should appear a bit delayed (your orderbook watcher actually contacts every maker–in this case "yourself"–in order to get the bond info). Hint: You can use the Refresh button on the orderbook overlay. |
ok i'll try that.. |
Thanks 🙏 Please report back.
Zero means there is no bond (or not yet loaded). This is actually a good point.. do you think it would be better to show something else? e.g. or a "no bond" label? |
I refreshed it many times but still its value is still 0.
we can do that but i think at the same time it can be confusing for the user as well. Maybe we can add some more info for user when value is 0(no bond) when he hovers over it. |
Glad it worked out. Should have mentioned that the FB needs some confirmations 🤦 Sorry 😬
You are right. Balances in "light mode" on dark backgrounds (e.g. tooltips) are a problem. Needs to be addressed - I'd say it is okay to do in a follow-up PR. Okay for you? |
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 we can do that in follow-up PR.
Resolves #754.
Displays amount and expiration date of fidelity bonds in the orderbook overlay.
How to test
Create a fidelity bond for one of the dev makers (e.g. on localhost:29080 - you need to stop the maker, create a fidelity bond, and restart the maker again). Then, reload the orderbook on the main dev instance and verify that the correct Fidelity Bond information is displayed.
📸