-
Notifications
You must be signed in to change notification settings - Fork 208
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
fix Telescope encoding Decimal #10080
Changes from all commits
11a5629
03ccb8d
a32320a
6808b11
cbad08d
c1c5a6f
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -77,4 +77,5 @@ _testoutput.txt | |
|
||
|
||
junit.xml | ||
endo-sha.txt | ||
endo-sha.txt | ||
.aider* |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,14 @@ | ||
//@ts-nocheck | ||
/** | ||
* This file and any referenced files were automatically generated by @cosmology/telescope@1.7.1 | ||
* This file and any referenced files were automatically generated by @cosmology/telescope@1.8.3 | ||
* DO NOT MODIFY BY HAND. Instead, download the latest proto files for your chain | ||
* and run the transpile command or npm scripts command that is used to regenerate this bundle. | ||
*/ | ||
|
||
export type JsonSafe<T> = { | ||
[Prop in keyof T]: T[Prop] extends Uint8Array | bigint | Date | ||
? string | ||
: T[Prop]; | ||
}; | ||
export type JsonSafe<T> = T extends Uint8Array | bigint | Date | ||
? string | ||
: T extends Array<infer U> | ||
? Array<JsonSafe<U>> | ||
: T extends object | ||
? { [K in keyof T]: JsonSafe<T[K]> } | ||
: T; |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -160,8 +160,11 @@ export const chainFacadeMethods = harden({ | |
/** | ||
* for google/protobuf/timestamp.proto, not to be confused with TimestampShape | ||
* from `@agoric/time` | ||
* | ||
* `seconds` is a big integer but since it goes through JSON it is encoded as | ||
* string | ||
*/ | ||
export const TimestampProtoShape = { seconds: M.nat(), nanos: M.number() }; | ||
export const TimestampProtoShape = { seconds: M.string(), nanos: M.number() }; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. fwiw I didn't catch this analytically. it was caught by your improvement to JsonSafe in telescope that we finally have in agoric-sdk. That required this change: return /** @type {JsonSafe<MsgUndelegateResponse>} */ ({
// 5 seconds from unix epoch
- completionTime: { seconds: 5n, nanos: 0 },
+ completionTime: { seconds: '5', nanos: 0 }, Which then required the guard change. |
||
|
||
/** | ||
* see {@link TxBody} for more details | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm my understanding here, please? The reason for gitpkg rather than a link to github.com is that the package we want is not at the top level?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah... I see internal discussion Aug 20 to confirm that others in the shop know about gitpkg.