Skip to content

Task/sean/str 94 #18

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

Merged
merged 12 commits into from
Nov 1, 2022
Merged

Task/sean/str 94 #18

merged 12 commits into from
Nov 1, 2022

Conversation

auroter
Copy link
Contributor

@auroter auroter commented Oct 31, 2022

Onboarding API is working! Testing instructions:

  1. Add the SendGrid API key to your .env (I will send this to you)

  2. You may need to update the 'network' table in your local string_db be
    cause the previous RPC for ETH mainnet is deprecated and we are now using that RPC to verify the users wallet: network.csv

  3. Import the updated Insomnia configuration (it's zipped because Github doesn't allow JSON attachments):
    Insomnia_String_API_OCT_31_2022.json.zip

  4. Make sure you have a valid API key and JWT by using Platform Create, Auth Register, Auth Login. Place the API key in the Header as 'X-Api-Key' and place the JWT in the Bearer under Token

  5. Hit all the User endpoints:

  • Get User: Retrieves the status of a user based on "walletAddress"
  • Post User Create: Creates a new user based on "walletAddress"
  • Put User Sign: Validates a users wallet based on "walletAddress" and "signature"
  • Post User Name: Associates a name with a user based on "walletAddress", "firstName", "middleName", and "lastName"
  • Post User Email: Sends a verification e-mail with a link based on "walletAddress" and "emailAddress"
  • Post User Email Verify: Verifies an e-mail address using query:token
  1. Verify that the endpoints correctly modify and interact with the User, Contact, and Instrument tables in your local string_db.

EDIT: If you need all the SQL tables they are here:
sql.zip

assert.Equal(t, obj1, obj1Decoded)
}

func TestEncodeDecodeObject(t *testing.T) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks like these test are quite similar, maybe doing table testing pattern is a good approach here?

return common.StringError(errors.New("wallet not associated with user"))
}
// Encrypt required data to Base64 string and insert it in an email hyperlink
key := os.Getenv("STRING_ENCRYPTION_KEY")
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what type of key is this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A 32 character sequence which results in SHA256 encryption

@auroter auroter merged commit 38d4528 into develop Nov 1, 2022
@ocasta181 ocasta181 deleted the task/sean/str-94 branch February 23, 2023 19:07
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.

3 participants