Skip to content

Support v4 farms #927

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

Closed
AhmedHanafy725 opened this issue Feb 19, 2025 · 15 comments
Closed

Support v4 farms #927

AhmedHanafy725 opened this issue Feb 19, 2025 · 15 comments
Assignees
Milestone

Comments

@AhmedHanafy725
Copy link
Contributor

  • Add v3 & v4 tabs at the top on the same farming screen.
  • The UI should be the same.
@zaelgohary zaelgohary self-assigned this Feb 19, 2025
@zaelgohary zaelgohary moved this to Accepted in 3.16.x Feb 19, 2025
@zaelgohary zaelgohary added this to the 4.2.x milestone Feb 19, 2025
@zaelgohary zaelgohary moved this from Accepted to In Progress in 3.16.x Feb 20, 2025
@zaelgohary
Copy link
Contributor

WIP:

Changed farms screen layout to include 2 tabs, v3 & v4. Also, added registrar service.

@zaelgohary
Copy link
Contributor

Blocked on dart registrar client to be ready.

@zaelgohary zaelgohary moved this from In Progress to Blocked in 3.16.x Feb 23, 2025
@zaelgohary zaelgohary moved this from Blocked to In Progress in 3.16.x Feb 25, 2025
@zaelgohary
Copy link
Contributor

WIP:

I added two listing functions: one for v3 farms and another for v4 farms. However, I'm unsure how to connect wallets before listing v4 farms. @AhmedHanafy725 suggested creating a registrar account only when a farm is created. However, I’m still uncertain about the listing process if no account is found. (Listing happens in initState)

Should I create an account for each wallet before listing? Shouldn't users be informed of the difference between v3 & v4 farms? Also, shouldn’t users be informed about the account creation process?

@zaelgohary
Copy link
Contributor

zaelgohary commented Feb 27, 2025

WIP:

Removed register service, added listV3 & listV4 farms + generateKeypair, Fixed listFarmsWidget if farms are empty, added farm depending on the active tab. Currently working on changing farm details UI depending on the farm type.

@zaelgohary
Copy link
Contributor

WIP:

Fixed listing wallets, and addFarm dialogue overflow. There was an issue with generating keys from mnemonics so I fixed that too. Added create registrar account & v4 farm logic but I'm stuck as it always gives me 404 whenever I try to create an account. I fixed some issues related to conflicts in farm types, too.

@mik-tf
Copy link

mik-tf commented Mar 3, 2025

Amazing work. Is there a current APK with this feature? If possible, let me know where to download it. Then I can test it on V4 nodes myself and with v4 node vendors.

@xmonader @zaelgohary @AhmedHanafy725

Any way we can release this within the next 10 days on the app + google stores? We promised customers on 12.12 that nodes would be shipped before the end of Q1. This gives us a couple of weeks. Thanks!

@zaelgohary
Copy link
Contributor

zaelgohary commented Mar 4, 2025

WIP:

I successfully created a farm and was able to list it, However, when I tried to create another farm with the same wallet I faced multiple errors. Also, fixed mixed types (differences between v3 & v4 farm). but faced the same issue while trying to list v4 farms again. Still looking into it.

Also, checked the key generation used in the client and in the registrar to match the generation from the app. (Should use lib sodium in generating keys in case mnemonic seed instead of bip39)

@zaelgohary
Copy link
Contributor

zaelgohary commented Mar 6, 2025

Fixed the mismatch error. I forgot to change the v4 farm type before populating the farm item widget. Also, found a bug where a new farm object is being added to farms even if sth wrong happened. Fixed that too. Conditioned creating farm only if account is not null.

The PR is ready to be tested; however, the stellar address field is still missing from the registrar and its dart client & the nodes field never updates. I'm currently working on refactoring my code, but once I'm done, I should be blocked on that.

@zaelgohary zaelgohary moved this from In Progress to Pending Review in 3.16.x Mar 6, 2025
@zaelgohary
Copy link
Contributor

Work Completed:

Did some refactoring in the PR. Also, applied stellar changes in dart client and the app.

@zaelgohary zaelgohary moved this from Pending Review to Pending Deployment in 3.16.x Mar 12, 2025
@zaelgohary
Copy link
Contributor

Fixed v4 farm name verification and replaced polling wallets in farms w stream listener in provider itself. Fixed some other bugs too.

@AlaaElattar AlaaElattar moved this from Pending Deployment to In Verification in 3.16.x Mar 12, 2025
@mik-tf
Copy link

mik-tf commented Mar 12, 2025

Amazing thanks for the work and the release on time!

@khaledyoussef24
Copy link

verified version 4.2.0 IOS
user now can create V4 farms using threefold connect app

Image

Image

Image

Image

testcase 1
testcase 2
testcase 3
testcase 4

@khaledyoussef24 khaledyoussef24 moved this from In Verification to Done in 3.16.x Mar 17, 2025
@mik-tf
Copy link

mik-tf commented Mar 18, 2025

The app is updated on the stores. I could create a farm. Great.

What is the logic with the Stellar wallet here? V4 isn't linked to Stellar.

@AhmedHanafy725
Copy link
Contributor Author

What is the logic with the Stellar wallet here? V4 isn't linked to Stellar.

added for future use in case we need it

@mik-tf
Copy link

mik-tf commented Mar 19, 2025

OK I understand that. The situation is that V4 won't be on Stellar so the address on Stellar is not relevant here and can be misleading for farmers.

Can we set the farm creation v4 to be without a wallet and then farmers can add a wallet later, e.g. when we decided on the blockchain and then farmers can select that blockchain wallet? We can see what's best for what's to come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Done
Development

No branches or pull requests

5 participants