2

Just forked the point of sale repo, and I'm trying to figure out how to isolate the sender's public key and display it on the Recent Transactions page via the Transactions.tsx file.

Ideally, I'd like to see the sender's public key rather than the transaction signature as shown below. This is the default: enter image description here

Assuming I have to initialize this somewhere (likely when the transaction is created), but I'm very new to this and I'm a bit lost.

Appreciate any and all suggestions!

1 Answer 1

3

In the TransactionsProvider you would need to make the necessary changes to retrieve the source public key and then add it to the state with the transaction.

Here is where the instruction is parsed from the transaction. A few lines below that, you can see the variable ‘info’ being set, ‘info.source’ is the value that you are looking for.

Here is a place you see it being used to check for self transfers.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.