-
Notifications
You must be signed in to change notification settings - Fork 45
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
Delay GetEpoch request until needed #2064
Conversation
Deployed to Cloudflare Pages
|
a6bc87b
to
76f90de
Compare
const nic = yield* call(getOasisNic, network) | ||
const { epoch } = yield* all({ | ||
epoch: call([nic, nic.beaconGetEpoch], oasis.consensus.HEIGHT_LATEST), | ||
}) |
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.
Hm, one thing I didn't consider before:
if grpc is down, users now won't know until they try to make a transaction
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.
Future issue #2071
const currentEpoch = useSelector(selectEpoch) | ||
const remainingHours = (props.epoch - currentEpoch) / estimatedEpochsPerHour | ||
if (!props.currentEpoch) { | ||
return null |
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.
"Epoch: ${props.epoch}" would be a very good fallback
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.
will keep as is. default value would require handling isLoading for epoch in redux too. Without it, user would see "blinking" value / switching from default to target value.
Added commit to refetch epoch after network switch.
src/app/pages/OpenWalletPage/Features/FromMnemonic/__tests__/index.test.tsx
Show resolved
Hide resolved
src/app/pages/StakingPage/Features/DelegationList/DebondingDelegationList.tsx
Outdated
Show resolved
Hide resolved
8bbbf7e
to
6f1d3f4
Compare
The second part of #1991
FromMnemonic
not related to changes. PR hits timeouts in CI because component callsgetAccountBalanceWithFallback
saga for each account in modal. It is not needed in this unit tests.