Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ironfish): add note hash to wallet/getAccountNotesStream RPC #3831

Merged
merged 1 commit into from
Apr 24, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions ironfish-cli/src/commands/wallet/notes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,9 @@ export class NotesCommand extends IronfishCommand {
sender: {
header: 'Sender',
},
noteHash: {
header: 'Note Hash',
},
transactionHash: {
header: 'From Transaction',
},
Expand Down
3 changes: 3 additions & 0 deletions ironfish/src/rpc/routes/wallet/getNotes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ export type GetAccountNotesStreamResponse = {
assetName: string
memo: string
sender: string
noteHash: string
transactionHash: string
spent: boolean | undefined
}
Expand All @@ -33,6 +34,7 @@ export const GetAccountNotesStreamResponseSchema: yup.ObjectSchema<GetAccountNot
assetName: yup.string().defined(),
memo: yup.string().trim().defined(),
sender: yup.string().defined(),
noteHash: yup.string().defined(),
transactionHash: yup.string().defined(),
spent: yup.boolean(),
})
Expand Down Expand Up @@ -62,6 +64,7 @@ router.register<typeof GetAccountNotesStreamRequestSchema, GetAccountNotesStream
value: CurrencyUtils.encode(note.value()),
assetId: note.assetId().toString('hex'),
assetName: asset?.name.toString('hex') || '',
noteHash: note.hash().toString('hex'),
memo: note.memo(),
sender: note.sender(),
transactionHash: transaction.transaction.hash().toString('hex'),
Expand Down