Skip to content

add onboarding payload#20

Merged
ex10ded merged 4 commits intomainfrom
add_l1_key_generation
Aug 2, 2024
Merged

add onboarding payload#20
ex10ded merged 4 commits intomainfrom
add_l1_key_generation

Conversation

@ex10ded
Copy link
Copy Markdown
Contributor

@ex10ded ex10ded commented Jul 31, 2024

Changes

  • [Describe your changes here]
  • ...

@ex10ded ex10ded force-pushed the add_l1_key_generation branch from 7a981b4 to ed68532 Compare July 31, 2024 10:50
Copy link
Copy Markdown
Contributor

@alexex10 alexex10 left a comment

Choose a reason for hiding this comment

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

Pls see some minor comments


payload = get_onboarding_payload(
l1_account,
time=datetime.datetime(
Copy link
Copy Markdown
Contributor

@alexex10 alexex10 Jul 31, 2024

Choose a reason for hiding this comment

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

[nit] We can also do it this way (or with strptime):

datetime.fromisoformat('2024-07-30T16:01:02+00:00')

),
).to_json()

assert (
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

[nit] It might be better to do it this way:

from hamcrest import assert_that, equal_to

assert_that(
        payload,
        equal_to(
            {
                # ....
            }
        ),
    )

Comment thread x10/perpetual/user_client/onboarding.py Outdated
action: str

def __post_init__(self):
self.time_string = self.time.astimezone(UTC).strftime("%Y-%m-%dT%H:%M:%SZ")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is better to add this field to class definition

}
types = {
"EIP712Domain": [
{"name": "name", "type": "string"},
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Just curious if we need to add chainId?

action: str

def __post_init__(self):
self.time_string = self.time.astimezone(timezone.utc).strftime("%Y-%m-%dT%H:%M:%SZ")
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

It is better to add this field to class definition

@ex10ded ex10ded merged commit ae32e40 into main Aug 2, 2024
0xsumatt pushed a commit to 0xsumatt/x10_python_sdk that referenced this pull request Mar 31, 2025
@alexex10 alexex10 deleted the add_l1_key_generation branch June 23, 2025 08:57
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.

2 participants