-
Notifications
You must be signed in to change notification settings - Fork 15
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 expiry in test-vector #698
Conversation
Expiry takes as a constructor argument the time _delta_ in millis. Supplied was the absolute timestamp as a number (but too large to use accurate integer representation). This fixes the bug. In addition, the test vector should be called ICRC-21 rather then ICRC-29.
size-limit report 📦
|
@@ -37,7 +37,7 @@ const consentMessageRequest = { | |||
"4449444C076D7B6C01D880C6D007716C02CBAEB581017AB183E7F1077A6B028BEABFC2067F8EF1C1EE0D026E036C02EFCEE7800401C4FBF2DB05046C03D6FCA70200E1EDEB4A7184F7FEE80A0501060C4449444C00017104746F626905677265657402656E01011E000300", | |||
), | |||
canister_id: Principal.fromHex("00000000006000FD0101"), | |||
ingress_expiry: new Expiry(1712666698482000000), |
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.
@frederikrothenberger the helper _prepareCborForLedger
expects a type Expiry
in ingress_expiry
.
Apparently it's ok to pass a negative number. Therefore, I calculated the delta.
I'm not sure how then Expiry will convert this to the actual number. There might be a small delay that messes with it.
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.
Thanks for the fix @frederikrothenberger .
I push a commit to fix the script.
Motivation
Expiry takes as a constructor argument the time delta in millis. Supplied was the absolute timestamp as a number (but too large to use accurate integer representation).
This fixes the bug.
In addition, the test vector should be called ICRC-21 rather then ICRC-29.