@@ -69,7 +69,7 @@ interface GroupedPaymentsAndInfoObject {
6969 info : AddressPaymentInfo
7070}
7171
72- export const generatePaymentFromTx = async ( tx : TransactionsWithPaybuttonsAndPrices ) : Promise < Payment > => {
72+ export const generatePaymentFromTx = ( tx : TransactionsWithPaybuttonsAndPrices ) : Payment => {
7373 const values = getTransactionValue ( tx )
7474 let buttonDisplayDataList : Array < { name : string , id : string } > = [ ]
7575 if ( tx . address . paybuttons !== undefined ) {
@@ -97,7 +97,7 @@ export const generatePaymentFromTx = async (tx: TransactionsWithPaybuttonsAndPri
9797 }
9898}
9999
100- export const generatePaymentFromTxWithInvoices = async ( tx : TransactionWithAddressAndPricesAndInvoices , userId ?: string ) : Promise < Payment > => {
100+ export const generatePaymentFromTxWithInvoices = ( tx : TransactionWithAddressAndPricesAndInvoices , userId ?: string ) : Payment => {
101101 const values = getTransactionValue ( tx )
102102 let buttonDisplayDataList : Array < { name : string , id : string } > = [ ]
103103 if ( tx . address . paybuttons !== undefined ) {
@@ -141,7 +141,7 @@ export const generateAndCacheGroupedPaymentsAndInfoForAddress = async (address:
141141 for ( const tx of batch ) {
142142 balance = balance . plus ( tx . amount )
143143 if ( tx . amount . gt ( 0 ) ) {
144- const payment = await generatePaymentFromTx ( tx )
144+ const payment = generatePaymentFromTx ( tx )
145145 paymentList . push ( payment )
146146 paymentCount ++
147147 }
@@ -235,7 +235,7 @@ const cacheGroupedPaymentsAppend = async (paymentsGroupedByKey: KeyValueT<Paymen
235235export const cacheManyTxs = async ( txs : TransactionsWithPaybuttonsAndPrices [ ] ) : Promise < void > => {
236236 const zero = new Prisma . Decimal ( 0 )
237237 for ( const tx of txs . filter ( tx => tx . amount > zero ) ) {
238- const payment = await generatePaymentFromTx ( tx )
238+ const payment = generatePaymentFromTx ( tx )
239239 if ( payment . values . usd !== new Prisma . Decimal ( 0 ) ) {
240240 const paymentsGroupedByKey = getPaymentsByWeek ( tx . address . address , [ payment ] )
241241 void await cacheGroupedPaymentsAppend ( paymentsGroupedByKey )
0 commit comments