feat(orderbook): show fidelity bond value and locktime#766
feat(orderbook): show fidelity bond value and locktime#766theborakompanioni merged 5 commits intomasterfrom
Conversation
06256a8 to
da316fd
Compare
0xSaksham
left a comment
There was a problem hiding this comment.
Altogether the changes look good. Definitely able to merge.
| bondValue: { | ||
| value: number | ||
| displayValue: string // example: "0" (no fb) or "114557102085.28133" | ||
| locktime?: number |
There was a problem hiding this comment.
This part looks fine! Should amount also be explicitly converted to string?
There was a problem hiding this comment.
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?
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? |
bhaveshg16
left a comment
There was a problem hiding this comment.
yes we can do that in follow-up PR.
Agreed. Tracked in #770. Thanks @barrytra! 🙏 |



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.
📸