Compare commits
2 Commits
1d82bc2261
...
eab6dbd74c
Author | SHA1 | Date | |
---|---|---|---|
eab6dbd74c | |||
6159686a8e |
@ -77,6 +77,11 @@ func GetTransferData(ctx context.Context, db storage.PrefixDb, publicKey string,
|
||||
dates := strings.Split(string(data["txdate"]), "\n")
|
||||
syms := strings.Split(string(data["txsym"]), "\n")
|
||||
|
||||
// Check if index is within range
|
||||
if index < 1 || index > len(senders) {
|
||||
return "", fmt.Errorf("transaction not found: index %d out of range", index)
|
||||
}
|
||||
|
||||
// Adjust for 0-based indexing
|
||||
i := index - 1
|
||||
transactionType := "received"
|
||||
|
@ -1754,8 +1754,8 @@ func (h *Handlers) GetTransactionsList(ctx context.Context, sym string, input []
|
||||
return res, nil
|
||||
}
|
||||
|
||||
// ViewTransactionStatement retrieves the token holding and balance from the subprefixDB
|
||||
// and displays it to the user for them to select it
|
||||
// ViewTransactionStatement retrieves the transaction statement
|
||||
// and displays it to the user
|
||||
func (h *Handlers) ViewTransactionStatement(ctx context.Context, sym string, input []byte) (resource.Result, error) {
|
||||
var res resource.Result
|
||||
sessionId, ok := ctx.Value("SessionId").(string)
|
||||
|
Loading…
Reference in New Issue
Block a user