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

Durations are being typed incorrectly #211

Closed
Tracked by #278
NoahSaso opened this issue Sep 20, 2022 · 4 comments
Closed
Tracked by #278

Durations are being typed incorrectly #211

NoahSaso opened this issue Sep 20, 2022 · 4 comments

Comments

@NoahSaso
Copy link
Contributor

Longs are typed with a class but appear to be serialized as a string representing its value in seconds.

image
image
image
image

@pyramation
Copy link
Collaborator

related #142

@NoahSaso
Copy link
Contributor Author

oh yeah jk it's Duration not Long

@NoahSaso NoahSaso changed the title Longs are being typed incorrectly Durations are being typed incorrectly Sep 20, 2022
@pyramation
Copy link
Collaborator

osmosis-labs/osmojs#12

@pyramation
Copy link
Collaborator

please try the new release candidate to test this via osmojs:

example here https://github.com/cosmology-tech/cosmology/blob/main/packages/cli/src/commands/lock.ts#L113-L116

  const msg = lockTokens({
    owner: account.address,
    coins,
    duration: Duration.fromPartial({
      seconds: Long.fromString(duration),
      nanos: 0
    })
  });

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

No branches or pull requests

2 participants