-
Notifications
You must be signed in to change notification settings - Fork 3
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
Add balance and transfer #24
base: master
Are you sure you want to change the base?
Conversation
Hey @leetdev, thanks for submitting this work! I just checked out your PR branch, and ran into a build error when I ran yarn and then yarn build. Is there anything particular I need to do before I can run the code?
|
Oh I found out we currently have to use api.rpc like this.. |
Hi @Amy-Centrality! You're right, I forgot to address that error, which is an issue with the API library. Should I commit a fix in my branch? |
Yes please make the change in your branch :) |
Hey thanks for fixing it up! I ran into some more errors when I try to load it in Chrome. Have you got a fix for these too?
|
@Amy-Centrality, I've managed to fix some of those errors but unfortunately not all. The main problem is that the cennznet api package has different version requirement of the polkadot api than this extension does. I did upgrade it to the newest alpha version which upgrades some of the dependencies, but there's still a few conflicts that remain. I think this issue should really be addressed on the API level, not here. |
I see that makes sense, thank you. I will chat with the team about resolving the issues on the API side :) |
Hmm.. do you have a way so I can test this while we wait for the fix on the API side? how did you test it while you developed it? |
The extension works just fine for me despite the warnings in the console. |
I see, awesome work! Somehow chrome didn't let me load it earlier, but it's all good now. Just one more issue before we can close this bounty :) In the transfer screen, I'm not able to access the Send Funds button because it's been pushed under the window and there's no way to scroll down.. would you be able to fix this please? |
I've adjusted the layout by moving the asset dropdown right next to the amount input. This fixes the overflow issue. |
That was my bad. Should be fixed now. |
I'll admit, this is what happens when tests are not being created for new features. I wish I had the time to write tests for my developments, but I just ran out. I would love to keep working on this project and develop the tests, as well as some other things that would improve the added features (such as periodic updates of balances, for example). If you're interested in further contributions from me on this, please let me know. |
Hey @leetdev, I asked our developers to review this PR, and they came back with some feedback. I know that we've already closed this bounty, but I hope you could help with these since you are the most familiar with this part of the code. (We had to close the bounty due to time limits from GitCoin) We should ideally fix the following before merging:
Issue number 1 is very important, as it currently won't show the balance update. You can subscribe to change in balance for cennz and cpay following this example, |
Hi @Amy-Centrality! I can work on those issues next week as I'm kind of preoccupied at the moment. I can definitely fix issue numbers 1 and 3 quite expediently, but issue 2 (writing tests) is a bit more time consuming. I can't promise right now when I might have the time to get around to it... But I'll gladly work on the other issues next week. |
Awesome! Thanks very much @leetdev! :) |
Hi @Amy-Centrality, For some reason I was sure I finished working on this, but just found it in my open PRs list, I must have completely blanked! My apologies, I have no idea how it could have happened... I have some free time right now, I will see if I can finally clear this up. |
As per https://gitcoin.co/issue/cennznet/grants/10/100026473, added display of balances for CENNZNET accounts as well as simple transfer functionality.
User guide: https://hackmd.io/LKhbIRkjTRiKWRCq5YbDkg?view
Shortcomings:
To be honest, I was planning to work on these, but just ran out of time. I will gladly fix those issues in the future when I get the chance.