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

chore: add warning banner + info tooltip related to the possible pending reward calculation inaccuracy #1616

Merged
merged 6 commits into from
Feb 5, 2025
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions src/pages/AccountDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,6 @@

<PageFrame>
<template #pageContent>
<div v-if="temporaryBanner" class="hero is-small mb-5" style="background-color: var(--h-theme-highlight-color);">
<div class="hero-body h-is-property-text p-3" v-html="temporaryBanner"/>
</div>

<DashboardCard collapsible-key="accountDetails">
<template v-if="!isInactiveEvmAddress" v-slot:title>
<figure
Expand Down Expand Up @@ -169,7 +165,7 @@
</template>
</EditableProperty>

<Property v-if="enableStaking" id="pendingReward">
<Property v-if="enableStaking" id="pendingReward" :tooltip="rewardIssueWarning">
<template v-slot:name>Pending Reward</template>
<template v-slot:value>
<HbarAmount :amount="account?.pending_reward" :show-extra="true" timestamp="0"/>
Expand Down Expand Up @@ -409,7 +405,7 @@ const props = defineProps({
network: String,
})

const temporaryBanner = import.meta.env.VITE_APP_TEMPORARY_BANNER ?? null
const rewardIssueWarning = 'Pending staking reward calculation may temporarily be inaccurate. See more details at: https://status.hedera.com'

const isMediumScreen = inject('isMediumScreen', true)
const networkConfig = NetworkConfig.inject()
Expand Down
7 changes: 7 additions & 0 deletions src/pages/Staking.vue
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@
:account-id="accountId"/>


<div v-if="temporaryBanner" class="hero is-small mb-5" style="background-color: var(--h-theme-highlight-color);">
<div class="hero-body h-is-property-text p-3 has-text-centered" v-html="temporaryBanner"/>
</div>

<DashboardCard v-if="enableWallet" collapsible-key="stakingDetails">
<template v-slot:title>
<div>
Expand Down Expand Up @@ -270,6 +274,8 @@ export default defineComponent({
},

setup(props) {
const temporaryBanner = import.meta.env.VITE_APP_TEMPORARY_BANNER ?? null

const isSmallScreen = inject('isSmallScreen', true)
const isMediumScreen = inject('isMediumScreen', true)
const cryptoName = CoreConfig.inject().cryptoName
Expand Down Expand Up @@ -464,6 +470,7 @@ export default defineComponent({
1000)

return {
temporaryBanner,
isSmallScreen,
isMediumScreen,
cryptoName,
Expand Down
7 changes: 0 additions & 7 deletions src/pages/Transactions.vue
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,6 @@
<PageFrame>
<template #pageContent>

<div v-if="temporaryBanner" class="hero is-small mb-5" style="background-color: var(--h-theme-highlight-color);">
<div class="hero-body h-is-property-text p-3" v-html="temporaryBanner"/>
</div>

<DashboardCard>
<template v-slot:title>
<span class="h-is-primary-title">Recent Transactions</span>
Expand Down Expand Up @@ -84,8 +80,6 @@ export default defineComponent({
},

setup() {
const temporaryBanner = import.meta.env.VITE_APP_TEMPORARY_BANNER ?? null

const router = useRouter()

//
Expand All @@ -105,7 +99,6 @@ export default defineComponent({
onBeforeUnmount(() => transactionTableController.unmount())

return {
temporaryBanner,
transactionTableController,
transactionType: transactionTableController.transactionType
}
Expand Down
Loading