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

fix: Use sdk types for inclusion state #8265

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
e73bd56
feat: Sync SDK types
marc2332 Mar 22, 2024
4d28457
feat: stop generating txs out of outputs
marc2332 Mar 22, 2024
71f88e7
fix: tx history: include account output in average txs
cpl121 Mar 22, 2024
eb19a90
Merge branch 'develop-iota2.0' into feat/sync-sdk-types
cpl121 Mar 22, 2024
a850bb8
Merge branch 'feat/sync-sdk-types' into feat/stop-generating-txs-out-…
cpl121 Mar 22, 2024
3cedefe
Merge branch 'feat/stop-generating-txs-out-of-outputs' into fix/tx-hi…
cpl121 Mar 22, 2024
e499fa4
fix: Fix incorrect timestamp in Incoming txs
marc2332 Mar 25, 2024
4098672
fix: Receive funds to implicit account address
marc2332 Mar 25, 2024
07cf0a4
Merge branches 'fix/tx-history-include-account-output-in-avg-txs' and…
cpl121 Mar 25, 2024
c3f486e
Merge branch 'develop-iota2.0' into fix/tx-history-include-account-ou…
cpl121 Mar 25, 2024
a501aa2
Merge branch 'fix/tx-history-include-account-output-in-avg-txs' into …
cpl121 Mar 25, 2024
ea52b1c
Merge branch 'fix/incorrect-timestamp-incoming-txs' into fix/receive-…
cpl121 Mar 25, 2024
de89392
Merge branch 'develop-iota2.0' into fix/tx-history-include-account-ou…
cpl121 Mar 25, 2024
278543c
Merge branch 'fix/tx-history-include-account-output-in-avg-txs' into …
cpl121 Mar 25, 2024
f3f4e32
Merge branch 'fix/incorrect-timestamp-incoming-txs' into fix/receive-…
cpl121 Mar 25, 2024
e07821c
Merge branches 'fix/incorrect-timestamp-incoming-txs' and 'develop-io…
cpl121 Mar 25, 2024
c1d22a9
Merge branch 'fix/incorrect-timestamp-incoming-txs' into fix/receive-…
cpl121 Mar 25, 2024
a4f5c78
feat: add mana to txs in tx activities and activity details
cpl121 Mar 26, 2024
a0f9cb2
fix: Use sdk types for inclusion state
marc2332 Mar 26, 2024
a9e69c1
fix
marc2332 Mar 26, 2024
d96e4ed
fix
marc2332 Mar 26, 2024
541013a
Merge branch 'develop-iota2.0' into fix/incorrect-timestamp-incoming-txs
cpl121 Mar 27, 2024
8d3126b
Merge branch 'fix/incorrect-timestamp-incoming-txs' into fix/receive-…
cpl121 Mar 27, 2024
ba82151
Merge branch 'fix/receive-funds-to-implicit-account-address' into fea…
cpl121 Mar 27, 2024
d0cf2b7
Merge branch 'feat/add-mana-to-tx-history' into fix/use-sdk-types-inc…
cpl121 Mar 27, 2024
da3081a
resolve conflicts
marc2332 Mar 28, 2024
d04d747
Merge branch 'develop-iota2.0' into fix/use-sdk-types-inclusion-state…
begonaalvarezd Mar 28, 2024
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
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
import { selectedWallet } from '@core/wallet'
import {
isReservedTagKeyword,
InclusionState,
selectedWalletActivities,
newTransactionDetails,
NewTransactionType,
Expand All @@ -15,6 +14,7 @@
import SendNftForm from './SendNftForm.svelte'
import { OptionalInputType, SendFormTab } from '@core/wallet/utils/send/sendUtils'
import { FontWeight, Tabs, Text, TextType } from '@ui'
import { InclusionState } from '@iota/sdk/out/types'

const tabs: SendFormTab[] = [SendFormTab.SendToken, SendFormTab.SendNft]
const { type: transactionType, disableAssetSelection } = get(newTransactionDetails)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script lang="ts">
import { localize } from '@core/i18n'
import { InclusionState } from '@core/wallet'
import Pill from './Pill.svelte'
import { InclusionState } from '@iota/sdk/out/types'

export let localizationKey: string
export let inclusionState: InclusionState
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
<script lang="ts">
import { ActivityAction, ActivityDirection, ActivityType, InclusionState } from '@core/wallet'
import { ActivityAction, ActivityDirection, ActivityType } from '@core/wallet'
import ActivityInclusionStatusPill from './ActivityInclusionStatusPill.svelte'
import { InclusionState } from '@iota/sdk/out/types'

export let isInternal: boolean
export let type: ActivityType
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/components/tiles/ActivityTile.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
ActivityAsyncStatus,
ActivityType,
IAsset,
InclusionState,
NotVerifiedStatus,
getTokenFromSelectedWallet,
selectedWalletAssets,
} from '@core/wallet'
import { InclusionState } from '@iota/sdk/out/types'
import {
ActivityInclusionStatusPill,
AccountActivityTileContent,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { get } from 'svelte/store'

import { Event, TransactionInclusionWalletEvent, WalletEventType } from '@iota/sdk/out/types'
import { Event, InclusionState, TransactionInclusionWalletEvent, WalletEventType } from '@iota/sdk/out/types'

import { localize } from '@core/i18n'
import { InclusionState, MissingTransactionIdError, validateWalletApiEvent } from '@core/wallet'
import { MissingTransactionIdError, validateWalletApiEvent } from '@core/wallet'
import { showAppNotification } from '@auxiliary/notification'

import { ShimmerClaimingWalletState } from '../enums'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
import { ActivityAsyncStatus, ActivityType, InclusionState } from '@core/wallet/enums'
import { ActivityAsyncStatus, ActivityType } from '@core/wallet/enums'
import { addClaimedActivity, allWalletActivities } from '@core/wallet/stores'
import { showAppNotification } from '@auxiliary/notification'
import { localize } from '@core/i18n'
import { updateActivityFromPartialActivity } from '@core/wallet/utils/generateActivity/helper'
import { InclusionState } from '@iota/sdk/out/types'

export function updateClaimingTransactionInclusion(
transactionId: string,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
import { closePopup, openPopup, PopupId } from '@auxiliary/popup'
import { AccountOutput, TransactionInclusionWalletEvent, WalletEvent, WalletEventType } from '@iota/sdk/out/types'
import {
AccountOutput,
InclusionState,
TransactionInclusionWalletEvent,
WalletEvent,
WalletEventType,
} from '@iota/sdk/out/types'
import { updateParticipationOverview } from '@contexts/governance/stores'
import { isWalletVoting } from '@contexts/governance/utils/isWalletVoting'
import { updateNftInAllWalletNfts } from '@core/nfts'
Expand All @@ -14,7 +20,6 @@ import {
ActivityDirection,
ActivityType,
GovernanceActivity,
InclusionState,
WalletApiEventHandler,
} from '@core/wallet'
import { getWalletById, updateActiveWallet } from '@core/profile'
Expand Down
6 changes: 0 additions & 6 deletions packages/shared/lib/core/wallet/enums/inclusion-state.enum.ts

This file was deleted.

1 change: 0 additions & 1 deletion packages/shared/lib/core/wallet/enums/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ export * from './not-verified-status.enum'
export * from './token-standard.enum'
export * from './verified-status.enum'
export * from './return-strategy.enum'
export * from './inclusion-state.enum'
export * from './irc27-version.enum'
export * from './subject.enum'
export * from './wallet-colors.enum'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { ActivityDirection, InclusionState } from '@core/wallet/enums'
import { ActivityDirection } from '@core/wallet/enums'
import { IWrappedOutput } from './wrapped-output.interface'
import { UTXOInput } from '@iota/sdk/out/types'
import { InclusionState, UTXOInput } from '@iota/sdk/out/types'

export interface IProcessedTransaction {
outputs: IWrappedOutput[]
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ActivityAsyncStatus, ActivityDirection, InclusionState, ActivityAction } from '../../enums'
import { InclusionState } from '@iota/sdk/out/types'
import { ActivityAsyncStatus, ActivityDirection, ActivityAction } from '../../enums'
import { Subject } from '../subject.type'
import { Layer2Metadata } from '@core/layer-2'

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ActivityAction, ActivityDirection, ActivityType, GovernanceAction, InclusionState } from '../enums'
import { InclusionState } from '@iota/sdk/out/types'
import { ActivityAction, ActivityDirection, ActivityType, GovernanceAction } from '../enums'
import { Activity } from '../types'

export function getActivityTileTitle(activity: Activity): string {
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/lib/core/wallet/utils/isVisibleActivity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import { get } from 'svelte/store'
import { Activity } from '../types'
import { activityFilter } from '../stores'
import { getAssetFromPersistedAssets } from './getAssetFromPersistedAssets'
import { ActivityAsyncStatus, InclusionState, ActivityType } from '../enums'
import { ActivityAsyncStatus, ActivityType } from '../enums'
import { dateIsAfterOtherDate, dateIsBeforeOtherDate, datesOnSameDay } from '@core/utils'
import { ActivityFilter } from '../interfaces'
import { convertToRawAmount } from '.'
Expand All @@ -15,6 +15,7 @@ import {
NumberFilterOption,
StatusFilterOption,
} from '@core/utils/enums/filters'
import { InclusionState } from '@iota/sdk/out/types'

// Filters activities based on activity properties. If none of the conditionals are valid, then activity is shown.
export function isVisibleActivity(activity: Activity): boolean {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { CommonOutput, OutputData, OutputWithMetadata, UTXOInput } from '@iota/sdk/out/types'
import { CommonOutput, InclusionState, OutputData, OutputWithMetadata, UTXOInput } from '@iota/sdk/out/types'
import { IWalletState } from '@core/wallet/interfaces'
import { InclusionState, ActivityDirection } from '../../enums'
import { ActivityDirection } from '../../enums'
import { IProcessedTransaction, IWrappedOutput } from '../../interfaces'
import { getRecipientAddressFromOutput } from './getRecipientAddressFromOutput'
import { getSenderAddressFromInputs } from '../transactions'
Expand Down
3 changes: 2 additions & 1 deletion packages/shared/lib/core/wallet/utils/send/sendUtils.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { NewTransactionDetails, NftActivity, Subject, TransactionActivity, VestingActivity } from '@core/wallet/types'
import { NewTransactionType } from '@core/wallet/stores'
import { ActivityAction, ActivityDirection, ActivityType, InclusionState } from '@core/wallet/enums'
import { ActivityAction, ActivityDirection, ActivityType } from '@core/wallet/enums'
import { TimePeriod } from '@core/utils'
import { getAddressFromSubject } from '../getAddressFromSubject'
import {
Expand All @@ -11,6 +11,7 @@ import {
TRANSFER_ALLOWANCE,
getDestinationNetworkFromAddress,
} from '@core/layer-2'
import { InclusionState } from '@iota/sdk/out/types'

export enum SendFormTab {
SendToken = 'general.sendToken',
Expand Down
Loading