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

Update @stacks/[email protected], fix bns lookupProfile #2089

Merged
merged 4 commits into from
Feb 8, 2022

Conversation

kyranjamie
Copy link
Collaborator

@kyranjamie kyranjamie commented Dec 17, 2021

Try out this version of the Hiro Wallet - download extension builds.

Pushing @pradel's #2087 PR again so our CI/test builds run.

This PR will fixs the bns lookupProfile functionality. @pradel will write up steps we need to follow to QA this. cc/ @andresgalante can you plan when we'll include this in release?

@kyranjamie kyranjamie force-pushed the feature/stacks-3-1-0 branch 2 times, most recently from 446d9fe to 26637a2 Compare December 17, 2021 13:21
@friedger
Copy link
Contributor

There is a bug in 3.1.0 hirosystems/stacks.js#1152

@kyranjamie kyranjamie marked this pull request as draft December 20, 2021 14:22
@kyranjamie
Copy link
Collaborator Author

Thanks @friedger, yes this one is def not to merge yet. Converted to draft.

@pradel
Copy link
Contributor

pradel commented Dec 28, 2021

@kyranjamie would it be possible to get a new build with 3.1.1 please 🙏 ?

@kyranjamie
Copy link
Collaborator Author

@pradel done, building now

@pradel
Copy link
Contributor

pradel commented Dec 28, 2021

Amazing thanks!

@kyranjamie kyranjamie changed the title Feature/stacks 3 1 0 Feature/stacks 3 1 1 Jan 5, 2022
@pradel
Copy link
Contributor

pradel commented Jan 27, 2022

Hey there, any update to merge this one? :)

@kyranjamie kyranjamie changed the title Feature/stacks 3 1 1 Update @stacks/[email protected], fix bns lookupProfile Jan 28, 2022
@kyranjamie kyranjamie marked this pull request as ready for review January 28, 2022 09:42
@pradel
Copy link
Contributor

pradel commented Jan 28, 2022

The changes introduced in this pr are mostly related to how the profile is signed, so I think you need to login to an app using the publish_data scope. You could probably use the TODO app on this branch hirosystems/todos#104.

You would have to log in using an account owning a .btc name and you can try to call the lookupProfile function that would fail with the current Hiro wallet version and work with the one built on this branch.

@andresgalante
Copy link
Contributor

@kyranjamie I'd like to include this on our next release if possible.

I'll move it to "QA" so @Eshwari007 or @timstackblock can pick it up while it's being reviewed.

@Eshwari007
Copy link

@kyranjamie any input on how to test the ticket is much appreciated.Thx in ad

@andresgalante
Copy link
Contributor

@Eshwari007 this is how to test it #2089 (comment)

@Eshwari007
Copy link

@kyranjamie Want to run by you if am missing something here.

Screen Shot 2022-01-31 at 4 09 59 PM

Used the link from hirosystems/todos#103

@andresgalante
Copy link
Contributor

Hi @pradel, would you be able to help Esh test this PR? if async on the ticket is too slow, we can try on Discord

@pradel
Copy link
Contributor

pradel commented Feb 1, 2022

@andresgalante happy to help, do you have a channel on discord for this?

@vercel
Copy link

vercel bot commented Feb 1, 2022

This pull request is being automatically deployed with Vercel (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://vercel.com/blockstack/stacks-wallet-web/9SPM26G5Whw7Nt2tzV8NKPVWL453
✅ Preview: https://stacks-wallet-web-git-feature-stacks-3-1-0-blockstack.vercel.app

@vercel vercel bot temporarily deployed to Preview February 1, 2022 13:26 Inactive
@pradel
Copy link
Contributor

pradel commented Feb 1, 2022

I uploaded a build from the Todo app pending pr to netlify for you to test more easily https://blissful-agnesi-f97d5f.netlify.app/.

Now we just need #2194 to be merged into this branch and get a new build for the wallet in order to finish the testing part :)

Edit: The netlify build is not working so I prepared you a Sigle branch in order to test https://sigle-1ljk1nxmn-sigle.vercel.app/login

@Eshwari007
Copy link

Eshwari007 commented Feb 1, 2022

I uploaded a build from the Todo app pending pr to netlify for you to test more easily https://blissful-agnesi-f97d5f.netlify.app/.

Now we just need #2194 to be merged into this branch and get a new build for the wallet in order to finish the testing part :)
get a new build for the wallet in order to finish the testing part

cc @andresgalante @kyranjamie

@vercel vercel bot temporarily deployed to Preview February 1, 2022 14:52 Inactive
@vercel vercel bot temporarily deployed to Preview February 1, 2022 14:52 Inactive
@pradel
Copy link
Contributor

pradel commented Feb 2, 2022

Testing flow

Demo link: https://sigle-9i6eqj7dj-sigle.vercel.app/login

These are the tests cases with the new Hiro wallet version:

  1. legacy account migration: use an old account 12 word key with a *.id.blockstack attached to it and login. You should be able to see your existing drafts, published posts, visiting my blog as a public visitor should work too.
  2. legacy account migration: use an old account 12 word key with a *.id.stx attached to it and login. You should be able to see your existing drafts, published posts, visiting my blog as a public visitor should work too.
  3. account with *.btc domain: login with an account owning a .btc domain. You should see the .btc username in the left side menu (back part). Create a draft, publish it and then visit your public blog should work.
  4. registering new account: create a new account without username linked to it and register a new username. You should see the .id.stx username in the left side menu (back part). Create a draft, publish it and then visit your public blog should work.

To view your public blog, on the top right corner of the dashboard click on this button 👇
Screenshot 2022-02-02 at 17 14 48

@Eshwari007
Copy link

Eshwari007 commented Feb 3, 2022

https://sigle-9i6eqj7dj-sigle.vercel.app/login

@leopradel Somewhat good news.

Use case 3 : I was able to login in with .btc address ( bns address visible on the left-hand corner as well), create a blog ,save and publish it. I tried selecting 'view my blog but received 'token issuer error 'https://sigle-9i6eqj7dj-sigle.vercel.app/hiromaintest.btc. However, in the sigle app itself, I was able to view my test blog under the Published and Draft section.

User case 4: I tried login with a new account without username and received the following error on console
Screen Shot 2022-02-02 at 10 30 04 PM

Note: I dont have an account with bns name as per use case 1 and 2 hence will create one and test the app as well

@pradel
Copy link
Contributor

pradel commented Feb 3, 2022

Thanks for trying it out!

For case 3: the fact that you are seeing the "token issuer error" means that the profile is not signed properly, also meaning that the test failed.
Calling the API https://stacks-node-api.mainnet.stacks.co/v1/names/hiromaintest.btc show that your username is linked to the address SP17YZQB1228EK9MPHQXA8GC4G3HVWZ66X7VRPMAX. However your profile public key is 0217ecac7614a7a724f0addfc4241f756129171cc460eef430e895f04a08ff5658, and getting the address is actually not matching the one owned by the name.

const { getAddressFromPublicKey } = require('@stacks/transactions');
console.log(getAddressFromPublicKey('0217ecac7614a7a724f0addfc4241f756129171cc460eef430e895f04a08ff5658'));
// => SP2FB4MP6QZ1JV8JJZTCBYP7P9T6GXB0842YHYVX3

This is the result you would get by logging in with the current Hiro wallet version (without the fix from this pull request) as the profile is signed using the old stacks key. Can I ask you to triple check that the extension you tried does have the changes made in this pull request? #2196

For case 4: it's fine as it's not related to this pull request and the Hiro wallet in general but rather the subdomain registrar (I created an issue in the repo already).

@Eshwari007
Copy link

@pradel Spoke too soon.
I logged out and retested the entire scenario (this time with both .stx and .btc)with #2196

Findings:

Use case 3: the irony is that this partially worked bfr the token error was produced but now with the fix branch am not able to see any actions on the app upon selecting the account with btc on it

sigle.btc.account.mov

Use case 4:I was able to sign in with an account that doesn't have a bns attached to it and it created name.stx for me in the app
Screen Shot 2022-02-03 at 11 23 16 AM

@kyranjamie
Copy link
Collaborator Author

When QA approved, I'll make these changes #2172 (rather than merging this PR), as it'll be a real pain to rebase on.

@pradel
Copy link
Contributor

pradel commented Feb 4, 2022

@Eshwari007 I did the testing on multiple devices and it worked all the time. Would you mind trying one more time with a clean cache? 🙏

@Eshwari007
Copy link

Eshwari007 commented Feb 4, 2022

@Eshwari007 I did the testing on multiple devices and it worked all the time. Would you mind trying one more time with a clean cache? 🙏

@pradel Yay-good news. Test passed -used #2172
All the use cases passed. cc @kyranjamie

@andresgalante
Copy link
Contributor

Thanks a lot @Eshwari007 for testing this PR. Lets get it into the next release after 3.1

@beguene beguene merged commit c7bd538 into dev Feb 8, 2022
@beguene beguene deleted the feature/stacks-3-1-0 branch February 8, 2022 14:26
@beguene beguene restored the feature/stacks-3-1-0 branch February 11, 2022 08:10
@kyranjamie kyranjamie deleted the feature/stacks-3-1-0 branch July 12, 2022 07:54
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.

7 participants