WA-521 Adapt code to get data with 0x from tx-history-service

This commit is contained in:
apanizo 2018-08-18 11:37:07 +02:00
parent db35bf80c3
commit 3d25ae2db1
1 changed files with 2 additions and 1 deletions

View File

@ -9,6 +9,7 @@ import { loadSafeSubjects } from '~/utils/localStorage/transactions'
import { buildTxServiceUrlFrom, type TxServiceType } from '~/logic/safe/safeTxHistory'
import { enhancedFetch } from '~/utils/fetch'
import { getOwners } from '~/utils/localStorage'
import { EMPTY_DATA } from '~/logic/wallets/ethTransactions'
import addTransactions from './addTransactions'
type ConfirmationServiceModel = {
@ -49,7 +50,7 @@ const buildTransactionFrom = (safeAddress: string, tx: TxServiceModel, safeSubje
value: Number(tx.value),
confirmations,
destination: tx.to,
data: `0x${tx.data || ''}`,
data: tx.data ? tx.data : EMPTY_DATA,
isExecuted: tx.isExecuted,
})
}