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

[WIP] Add transaction to update init JSON #137

Merged
merged 13 commits into from
Sep 25, 2018
Merged

[WIP] Add transaction to update init JSON #137

merged 13 commits into from
Sep 25, 2018

Conversation

sidmutha
Copy link
Contributor

issue: #126

@phoorichet
Copy link
Contributor

@sidmutha Nice! Do we have a way to remove data at with a given version using cli?

Image: "PathToImage",
UserId: "AccountUser",
Image: "PathToImage",
Version: "v1",
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure it makes sense to version the users, specifically unless there is a clear reason to

@@ -259,8 +465,9 @@ func TestCardCollectionOperations(t *testing.T) {

setup(c, pubKeyHexString, &addr, &ctx, t)
setupAccount(c, ctx, &zb.UpsertAccountRequest{
UserId: "CardUser",
Image: "PathToImage",
UserId: "CardUser",
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure it makes sense to version the users, specifically unless there is a clear reason to

@@ -279,8 +486,9 @@ func TestDeckOperations(t *testing.T) {

setup(c, pubKeyHexString, &addr, &ctx, t)
setupAccount(c, ctx, &zb.UpsertAccountRequest{
UserId: "DeckUser",
Image: "PathToImage",
UserId: "DeckUser",
Copy link
Contributor

Choose a reason for hiding this comment

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

not sure it makes sense to version the users, specifically unless there is a clear reason to

@@ -10,8 +10,9 @@ import (
)

var createAccCmdArgs struct {
userID string
value string
userID string
Copy link
Contributor

Choose a reason for hiding this comment

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

lets just leave all the account creation alone, I'm not certain if this makes much sense yet

@@ -1,5 +1,5 @@
[[TestCases]]
RunCmd = "zb-cli create_account -k {{index $.AccountPrivKeyPathList 0}} -u loom"
RunCmd = "zb-cli create_account -k {{index $.AccountPrivKeyPathList 0}} -u loom -v v1"
Copy link
Contributor

Choose a reason for hiding this comment

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

can remove this version

@sidmutha
Copy link
Contributor Author

@mattkanwisher the create account had to be modified to take in the version because the CreateAccount transaction uses the default card lists to initialise the user data. These default lists have been versioned, hence everything that uses them needs to know the version.

@sidmutha
Copy link
Contributor Author

@mattkanwisher
Copy link
Contributor

mattkanwisher commented Sep 25, 2018

@sidmutha there probably needs to be a 'default' version. The person creating the account shouldn't have to be aware of what the deck version is. Or a way to request what the default version is, seems odd.

We can do that later, this PR looks overall fine now. Anything left to do before merging?

@sidmutha
Copy link
Contributor Author

Yeah we can have a default version in case no version is specified. We can talk to the game team and decide what that should be.
@phoorichet wanted a way to delete data in case it's needed but later said that we should talk to the games team to decide how that should be done.
Also, are the e2e tests fixed?

@mattkanwisher
Copy link
Contributor

e2e is fixed, I fixed the build

@mattkanwisher mattkanwisher merged commit 61eb942 into master Sep 25, 2018
@mattkanwisher mattkanwisher deleted the update-init branch September 25, 2018 06:19
mattkanwisher added a commit that referenced this pull request Sep 24, 2019
[WIP] Add transaction to update init JSON
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