-
Notifications
You must be signed in to change notification settings - Fork 217
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
Light Mode: currentCardanoEra #3209
Conversation
05278b2
to
926a4eb
Compare
bors try |
tryBuild succeeded: |
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.
Looks good to me! 😊 Again, I prefer the simply typed Either
.
Oh, and I only remembered now: Maybe make it clear in the name that these are mainnet eras? E.g. Or even add a
Our main reason for supporting testnet is so that Piotr can use it for QA. |
ad64a4a
to
e965f80
Compare
bors r+ |
Build succeeded: |
Node.AnyCardanoEra Node.AlonzoEra -> 290 | ||
Node.AnyCardanoEra Node.MaryEra -> 251 | ||
Node.AnyCardanoEra Node.AllegraEra -> 236 | ||
Node.AnyCardanoEra Node.ShelleyEra -> 202 |
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.
That's not what the wallet on mainnet shows for shelley
...
$ curl -X GET https://localhost:32787/v2/network/parameters | jq .eras
{
"mary": {
"epoch_start_time": "2021-03-01T21:44:51Z",
"epoch_number": 251
},
"byron": {
"epoch_start_time": "2017-09-23T21:44:51Z",
"epoch_number": 0
},
"allegra": {
"epoch_start_time": "2020-12-16T21:44:51Z",
"epoch_number": 236
},
"alonzo": {
"epoch_start_time": "2021-09-12T21:44:51Z",
"epoch_number": 290
},
"shelley": {
"epoch_start_time": "2020-07-29T21:44:51Z",
"epoch_number": 208
}
}
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.
Fixed here 0bf442d
Comments
Blockfrost API doesn't expose current Era so its implemented as a translation from current epoch number using a hardcoded table.
When new era type is added its expected that compiler emits a warning about non-exhaustive pattern match, thus forcing developer to update translation table with the corresponding epoch number;
Issue Number
ADP-1504