Capitalize the transfer statement details

This commit is contained in:
Alfred Kamanda 2024-12-11 19:25:38 +03:00
parent 43892f0d8c
commit 3129e8210e
Signed by: Alfred-mk
GPG Key ID: 7EA3D01708908703

View File

@ -84,18 +84,18 @@ func GetTransferData(ctx context.Context, db storage.PrefixDb, publicKey string,
// Adjust for 0-based indexing // Adjust for 0-based indexing
i := index - 1 i := index - 1
transactionType := "received" transactionType := "Received"
party := fmt.Sprintf("from: %s", strings.TrimSpace(senders[i])) party := fmt.Sprintf("From: %s", strings.TrimSpace(senders[i]))
if strings.TrimSpace(senders[i]) == publicKey { if strings.TrimSpace(senders[i]) == publicKey {
transactionType = "sent" transactionType = "Sent"
party = fmt.Sprintf("to: %s", strings.TrimSpace(recipients[i])) party = fmt.Sprintf("To: %s", strings.TrimSpace(recipients[i]))
} }
formattedDate := formatDate(strings.TrimSpace(dates[i])) formattedDate := formatDate(strings.TrimSpace(dates[i]))
// Build the full transaction detail // Build the full transaction detail
detail := fmt.Sprintf( detail := fmt.Sprintf(
"%s %s %s\n%s\ncontract address: %s\ntxhash: %s\ndate: %s", "%s %s %s\n%s\nContract address: %s\nTxhash: %s\nDate: %s",
transactionType, transactionType,
strings.TrimSpace(values[i]), strings.TrimSpace(values[i]),
strings.TrimSpace(syms[i]), strings.TrimSpace(syms[i]),