Skip to content

Commit

Permalink
fixup! Add EdgeTxInfo types
Browse files Browse the repository at this point in the history
  • Loading branch information
swansontec committed Oct 10, 2023
1 parent 23cbb63 commit a247526
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/core/currency/wallet/currency-wallet-api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -643,6 +643,7 @@ export function combineTxWithFile(

// Copy the tx properties to the output:
const out: EdgeTransaction = {
action: tx.action,
blockHeight: tx.blockHeight,
confirmations: tx.confirmations,
currencyCode,
Expand Down
4 changes: 4 additions & 0 deletions src/core/currency/wallet/currency-wallet-reducer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
EdgeMemo,
EdgeStakingStatus,
EdgeTransaction,
EdgeTxAction,
EdgeWalletInfo,
EdgeWalletInfoFull,
JsonObject
Expand Down Expand Up @@ -40,6 +41,7 @@ export interface TxidHashes {
}

export interface MergedTransaction {
action?: EdgeTxAction
blockHeight: number
confirmations: EdgeTransaction['confirmations']
currencyCode: string
Expand Down Expand Up @@ -416,12 +418,14 @@ export function mergeTx(
oldTx: MergedTransaction = defaultTx
): MergedTransaction {
const {
action,
currencyCode = defaultCurrency,
isSend = lt(tx.nativeAmount, '0'),
memos
} = tx

const out = {
action,
blockHeight: tx.blockHeight,
confirmations: tx.confirmations ?? 'unconfirmed',
currencyCode,
Expand Down

0 comments on commit a247526

Please sign in to comment.