-
Notifications
You must be signed in to change notification settings - Fork 1
fix: ignoring NFT transaction outputs with undecoded scripts #15
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -11,8 +11,8 @@ export interface Block { | |
| } | ||
|
|
||
| export interface DecodedScript { | ||
| type: string; | ||
| address: string; | ||
| type?: string; | ||
| address?: string; | ||
| timelock?: number | undefined | null; | ||
| value?: number | undefined | null; | ||
| tokenData?: number | undefined | null; | ||
|
|
@@ -222,12 +222,15 @@ export interface RawDecodedInput { | |
| token_data: number; | ||
| } | ||
|
|
||
| /* Everything is optional because scripts that were not able to | ||
| * be decoded will be returned as {} | ||
| */ | ||
| export interface RawDecodedOutput { | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same here
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same as above |
||
| type: string; | ||
| address: string; | ||
| type?: string; | ||
| address?: string; | ||
| timelock?: number | null; | ||
| value: number; | ||
| token_data: number; | ||
| value?: number; | ||
| token_data?: number; | ||
| } | ||
|
|
||
| export interface RawInput { | ||
|
|
@@ -276,6 +279,7 @@ export interface Meta { | |
| accumulated_weight: number; | ||
| score: number; | ||
| height: number; | ||
| validation?: string; | ||
|
pedroferreira1 marked this conversation as resolved.
|
||
| first_block?: string | null; | ||
| } | ||
|
|
||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If every member of this type is optional, why not use
Partial? We could also useDecodedScript | {}but then we would need to make type assertions where needed (from typescript issues).There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this will need a refactor everywhere that uses
DecodedScript, I will create an issue to refactor this and merge this PR as we discussed in SlackThere was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#16