Skip to content

Commit

Permalink
release: desktop 0.1.9 (#2105)
Browse files Browse the repository at this point in the history
* cleanup L2 balance fetches

* generate balance changes only if IRC is sent

* fix name

* cleanup old balance changes

* improve erc detection

* add prod migration

* feat: create ProjectionTogglePane for ProposalDetailsView & makes panes more concise (#2073)

* feat: create ProjectionTogglePane for ProposalDetailsView

* enhancement: makes ProposalDetailsView panes more concise

* feat: add remaining time pill in Governance proposal cards (#2074)

* feat: add remaining time pill in Governance proposal cards

* cleanup L2 balance fetches

* generate balance changes only if IRC is sent

* fix name

* cleanup old balance changes

* improve erc detection

* add prod migration

* fix: use remaining time in all event status except ended

---------

Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* fixes after reviews

* fix: remaining time pill in ProposalCard

---------

Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Nicole O'Brien <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* fix: Transak currency validation and defaultCryptoAmount (#2075)

Co-authored-by: Mark Nardi <[email protected]>

* Fix: governance menu (#2078)

* fix: move menu out of governance list

* fix: add borders in dark mode

* fix: add hover effects

* Revert "fix: move menu out of governance list"

This reverts commit 5b3b52c.

* chore: move placeholder into list

* feat: show projected votes as a secondary striped bar (#2077)

* feat: show projected votes as a secondary striped bar

* fix: circular dependency

* fix: projected votes

* chore: add test

---------

Co-authored-by: Tuditi <[email protected]>
Co-authored-by: Tuditi <[email protected]>

* enhancement: show ProposalAnswer additional info in a Popup (#2085)

* feat: add remaining time pill in Governance proposal cards (#2074)

* feat: add remaining time pill in Governance proposal cards

* cleanup L2 balance fetches

* generate balance changes only if IRC is sent

* fix name

* cleanup old balance changes

* improve erc detection

* add prod migration

* fix: use remaining time in all event status except ended

---------

Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* enhancement: show ProposalAnswer additional info in a Popup

---------

Co-authored-by: Tuditi <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* chore: version

* fix: missing param (#2084)

* New translations [ci skip] (#2091)

* feat: add remaining time pill in Governance proposal cards (#2074)

* feat: add remaining time pill in Governance proposal cards

* cleanup L2 balance fetches

* generate balance changes only if IRC is sent

* fix name

* cleanup old balance changes

* improve erc detection

* add prod migration

* fix: use remaining time in all event status except ended

---------

Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* New Crowdin translations by Github Action

---------

Co-authored-by: Tuditi <[email protected]>
Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>
Co-authored-by: Crowdin Bot <[email protected]>
Co-authored-by: Nicole O'Brien <[email protected]>

* enhancement: project votes for open phase (#2098)

* enhancement: show projected outcome on commencing phase

* fix: remove not used const and export projected

* enhancement: change find for includes

---------

Co-authored-by: Jean Ribeiro <[email protected]>

* fix: info buttons on proposal questions and answers (#2100)

* fix: info buttons on proposal questions and answers

* fix: localisation of question

* fix: localisation of read more

* feat: adds circulating supply in Governance (#2092)

* feat: add remaining time pill in Governance proposal cards (#2074)

* feat: add remaining time pill in Governance proposal cards

* cleanup L2 balance fetches

* generate balance changes only if IRC is sent

* fix name

* cleanup old balance changes

* improve erc detection

* add prod migration

* fix: use remaining time in all event status except ended

---------

Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>

* feat: adds network circulating supply data

* feat: adds circulating supply voted UI

* refactor: separate into a component and use quorum instead of circulating supply

* feat: adds tooltip

* fix: calculation of percentage in quroum of proposals

Co-authored-by: Jean Ribeiro <[email protected]>

* fixes

---------

Co-authored-by: Tuditi <[email protected]>
Co-authored-by: Mark Nardi <[email protected]>
Co-authored-by: Nicole O'Brien <[email protected]>

* chore: disabled transak

* chore: increment desktop version to `0.1.8`

* enhancement: improve quorum calculation for votes in progress

* fix: app name in locales

* fix: revert ledgerhq dep + yarnlock

* chore: increment desktop version to `0.1.9`

---------

Co-authored-by: Mark Nardi <[email protected]>
Co-authored-by: Tuditi <[email protected]>
Co-authored-by: Jean Ribeiro <[email protected]>
Co-authored-by: Tuditi <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: Crowdin Bot <[email protected]>
  • Loading branch information
7 people authored Mar 11, 2024
1 parent 27daad5 commit 357c6c7
Show file tree
Hide file tree
Showing 7 changed files with 1,375 additions and 1,558 deletions.
4 changes: 2 additions & 2 deletions packages/desktop/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "desktop",
"productName": "Bloom",
"version": "0.1.8",
"version": "0.1.9",
"description": "Simple and secure web3 wallet for the IOTA and Shimmer ecosystem",
"main": "public/build/main.process.js",
"repository": "[email protected]:bloomwalletio/bloom.git",
Expand Down Expand Up @@ -31,7 +31,7 @@
},
"dependencies": {
"@amplitude/analytics-node": "1.3.5",
"@ledgerhq/hw-app-eth": "6.35.5",
"@ledgerhq/hw-app-eth": "6.34.8",
"@ledgerhq/hw-transport-node-hid": "6.28.3",
"@ledgerhq/logs": "6.10.1",
"@types/webpack-dev-server": "4.7.2",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,24 @@
selectedParticipationEventStatus,
} from '@contexts/governance'
import { Text, Progress, TooltipIcon } from '@bloomwalletio/ui'
import { localize } from '@core/i18n'
import { getDecimalSeparator, localize } from '@core/i18n'
import { networkStatus } from '@core/network'
import { getSignificantDigitsAndRound } from '@core/utils'
export let proposal: IProposal
const QUORUM_PERCENTAGE_DECIMAL = 0.05
$: circulatingSupplyVotedPercentage = getCirculatingSupplyVotedPercentage(
$selectedParticipationEventStatus,
proposal
)
const currentMilestone = $networkStatus.currentMilestone
$: circulatingSupplyVotedPercentage =
getCirculatingSupplyVotedPercentage($selectedParticipationEventStatus, proposal, currentMilestone) ?? 0
function formatPercentage(percentage: number): string {
const percentageWithSignificantDigits = getSignificantDigitsAndRound(Number(percentage))
const percentageString = String(percentageWithSignificantDigits).replace(/[,.]/g, getDecimalSeparator()) + '%'
return percentageString
}
</script>

<div class="flex flex-col gap-1">
Expand All @@ -24,14 +32,10 @@
<TooltipIcon tooltip={localize('views.governance.details.quorum.tooltip')} />
</div>
<div class="flex gap-1">
<Text align="center" fontWeight="medium" textColor="brand"
>{circulatingSupplyVotedPercentage} / {QUORUM_PERCENTAGE_DECIMAL * 100}%</Text
>
<Text align="center" fontWeight="medium" textColor="brand">
{formatPercentage(circulatingSupplyVotedPercentage)} / {QUORUM_PERCENTAGE_DECIMAL * 100}%
</Text>
</div>
</div>
<Progress
size="sm"
progress={Number(circulatingSupplyVotedPercentage.replace('%', '').replace(',', '.')) /
QUORUM_PERCENTAGE_DECIMAL}
/>
<Progress size="sm" progress={circulatingSupplyVotedPercentage / QUORUM_PERCENTAGE_DECIMAL} />
</div>
Original file line number Diff line number Diff line change
@@ -1,31 +1,36 @@
import { IProfile } from '@core/profile/interfaces'
import { activeProfile } from '@core/profile/stores'
import { get } from 'svelte/store'
import { calculatePercentageOfBigInt } from '@core/utils/number'
import { ParticipationEventStatus } from '@iota/sdk'
import { get } from 'svelte/store'
import { IProposal } from '../interfaces'
import { calculatePercentageOfBigInt, getSignificantDigitsAndRound } from '@core/utils/number'
import { getDecimalSeparator } from '@core/i18n'

export function getCirculatingSupplyVotedPercentage(
participationEventStatus: ParticipationEventStatus,
proposal: IProposal,
currentMilestone: number,
profile: IProfile = get(activeProfile)
): string {
): number {
const circulatingSupply = profile.network.protocol?.circulatingSupply
if (!circulatingSupply || !participationEventStatus?.questions || !proposal?.milestones) {
return '0%'
return 0
}

let milestoneCount: number
if (currentMilestone < proposal.milestones.holding) {
milestoneCount = 1
} else if (currentMilestone > proposal.milestones.ended) {
milestoneCount = proposal.milestones.ended - proposal.milestones.holding
} else {
milestoneCount = currentMilestone - proposal.milestones.holding
}
const totalEventVotes = participationEventStatus.questions[0].answers.reduce(
(total, answer) => (total += BigInt(answer.accumulated)),
BigInt(0)
)
const milestoneCount = proposal.milestones.ended - proposal.milestones.holding
const maximumVotes = BigInt(circulatingSupply) * BigInt(milestoneCount)

const percentage = calculatePercentageOfBigInt(totalEventVotes, maximumVotes, 6)
const percentageWithSignificantDigits = getSignificantDigitsAndRound(Number(percentage))
const percentageString = String(percentageWithSignificantDigits).replace(/[,.]/g, getDecimalSeparator()) + '%'

return percentageString
return percentage
}
2 changes: 1 addition & 1 deletion packages/shared/src/locales/da.json
Original file line number Diff line number Diff line change
Expand Up @@ -676,7 +676,7 @@
"releasedAt": "Udgivet d.",
"updateAvailable": "Opdatering er tilgængelig",
"updatesDisabled": "Opdateringer er tilgængelige, men in-app opgradering er deaktiveret for operativsystemet.",
"latestInstalled": "Den seneste og sikreste version af Firefly anvendes"
"latestInstalled": "Den seneste og sikreste version af Bloom anvendes"
},
"backupStronghold": {
"title": "Backup your stronghold file",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -813,7 +813,7 @@
"releasedAt": "Veröffentlicht am",
"updateAvailable": "Ein Update ist verfügbar",
"updatesDisabled": "Es sind Updates verfügbar, aber In-App-Upgrade ist für Ihr Betriebssystem deaktiviert.",
"latestInstalled": "Du verwendest die neueste und sicherste Version von Firefly"
"latestInstalled": "Du verwendest die neueste und sicherste Version von Bloom"
},
"backupStronghold": {
"title": "Stronghold-Backup erstellen",
Expand Down
6 changes: 3 additions & 3 deletions packages/shared/src/locales/hr.json
Original file line number Diff line number Diff line change
Expand Up @@ -920,9 +920,9 @@
"tosAndPrivPolicyBody": "We have updated Bloom's Terms of Service and Privacy Policy.",
"tosBody": "We have updated Bloom's Terms of Service.",
"privPolicyBody": "We have updated Bloom's Privacy Policy.",
"tosAndPrivPolicyCheckbox": "Pročitao sam i slažem se s Firefly Uvjetima korištenja i Pravilima o privatnosti",
"tosCheckbox": "Pročitao sam i slažem se s Firefly Uvjetima korištenja",
"privPolicyCheckbox": "Pročitao sam i slažem se s Firefly Pravilima o privatnosti"
"tosAndPrivPolicyCheckbox": "Pročitao sam i slažem se s Bloom Uvjetima korištenja i Pravilima o privatnosti",
"tosCheckbox": "Pročitao sam i slažem se s Bloom Uvjetima korištenja",
"privPolicyCheckbox": "Pročitao sam i slažem se s Bloom Pravilima o privatnosti"
},
"giftedStorageDeposit": {
"tooltipTitle": "Gift storage deposit",
Expand Down
Loading

0 comments on commit 357c6c7

Please sign in to comment.