-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into 2548----bloom-not-working-after-menu-coll…
…ectables
- Loading branch information
Showing
26 changed files
with
218 additions
and
94 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
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
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
31 changes: 31 additions & 0 deletions
31
packages/shared/src/components/pills/ConfirmationPill.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,31 @@ | ||
<script lang="ts"> | ||
import { Pill } from '@bloomwalletio/ui' | ||
import { Activity, InclusionState } from '@core/activity' | ||
import { localize } from '@core/i18n' | ||
import { getEvmNetwork } from '@core/network/stores' | ||
import { getPersistedTransaction } from '@core/transactions/stores' | ||
export let activity: Activity | ||
let tooltip = '' | ||
async function onHover(): Promise<void> { | ||
tooltip = 'loading...' | ||
const transaction = getPersistedTransaction(activity.transactionId) | ||
const network = getEvmNetwork(activity?.sourceNetworkId) | ||
const blockHeight = await network?.provider.eth.getBlockNumber() | ||
const confirmations = BigInt(blockHeight ?? 0) - BigInt(transaction?.local?.blockNumber ?? 0) | ||
tooltip = ` | ||
${localize('general.confirmed')}: ${confirmations}\n | ||
${localize('general.required')}: ${network?.blocksUntilConfirmed} | ||
` | ||
} | ||
</script> | ||
|
||
{#if activity.inclusionState === InclusionState.Pending} | ||
<div role="contentinfo" on:focus={onHover} on:mouseover={onHover}> | ||
<Pill color="warning" compact tooltipEvent="hover" {tooltip}> | ||
{localize('general.pending')} | ||
</Pill> | ||
</div> | ||
{/if} |
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
7 changes: 0 additions & 7 deletions
7
packages/shared/src/lib/core/activity/enums/activity-status.enum.ts
This file was deleted.
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
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
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
Oops, something went wrong.