-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge remote-tracking branch 'origin/main' into NNS1-3485/range-filte…
…r-for-fetching-transactions
- Loading branch information
Showing
53 changed files
with
1,114 additions
and
274 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
<script lang="ts"> | ||
import AmountDisplay from "$lib/components/ic/AmountDisplay.svelte"; | ||
import { formatNumber } from "$lib/utils/format.utils"; | ||
import { UnavailableTokenAmount } from "$lib/utils/token.utils"; | ||
import { TokenAmountV2 } from "@dfinity/utils"; | ||
import { nonNullish } from "@dfinity/utils"; | ||
export let amount: TokenAmountV2 | UnavailableTokenAmount; | ||
export let amountInUsd: number | undefined; | ||
</script> | ||
|
||
<div class="values" data-tid="amount-with-usd-component"> | ||
<AmountDisplay singleLine {amount} /> | ||
<span data-tid="usd-value" class="usd-value"> | ||
{#if nonNullish(amountInUsd)} | ||
${formatNumber(amountInUsd)} | ||
{:else} | ||
$-/- | ||
{/if} | ||
</span> | ||
</div> | ||
|
||
<style lang="scss"> | ||
.values { | ||
display: flex; | ||
flex-direction: column; | ||
gap: var(--padding-0_5x); | ||
align-items: flex-end; | ||
.usd-value { | ||
color: var(--text-description); | ||
font-size: var(--font-size-small); | ||
} | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
frontend/src/lib/components/neuron-detail/actions/ConfirmFollowingButton.svelte
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
<script lang="ts"> | ||
import { i18n } from "$lib/stores/i18n"; | ||
import { startBusy, stopBusy } from "$lib/stores/busy.store"; | ||
import { refreshVotingPowerForNeurons } from "$lib/services/neurons.services"; | ||
import { createEventDispatcher } from "svelte"; | ||
export let neuronIds: bigint[]; | ||
const dispatcher = createEventDispatcher<{ | ||
nnsComplete: { successCount: number; totalCount: number }; | ||
}>(); | ||
const onClick = async () => { | ||
startBusy({ | ||
initiator: "refresh-voting-power", | ||
labelKey: "losing_rewards.confirming", | ||
}); | ||
const totalCount = neuronIds.length; | ||
const { successCount } = await refreshVotingPowerForNeurons({ neuronIds }); | ||
stopBusy("refresh-voting-power"); | ||
dispatcher("nnsComplete", { successCount, totalCount }); | ||
}; | ||
</script> | ||
|
||
<button | ||
on:click={onClick} | ||
class="secondary" | ||
data-tid="confirm-following-button-component" | ||
>{$i18n.losing_rewards.confirm}</button | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.