-
Notifications
You must be signed in to change notification settings - Fork 15
docs: Fullnode Typings [12] - SendTransaction #1014
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
09ff085
be6d512
642fc64
b266952
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -54,7 +54,7 @@ | |
| } | ||
|
|
||
| export interface ISendTokenOutput { | ||
| type: OutputType.P2PKH | OutputType.P2SH; | ||
| type: OutputType.P2PKH | OutputType.P2SH; // XXX: This type is ignored in the only place it is used | ||
| address: string; | ||
| value: OutputValueType; | ||
| token: string; | ||
|
|
@@ -506,7 +506,7 @@ | |
| // This just returns if the transaction is not a CREATE_TOKEN_TX | ||
| await addCreatedTokenFromTx(transaction as CreateTokenTransaction, storage); | ||
| // Add new transaction to the wallet's storage. | ||
| wallet.enqueueOnNewTx({ history: historyTx }); | ||
| wallet.enqueueOnNewTx({ type: '', history: historyTx }); // FIXME: Add a type here | ||
|
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. Why? This function does not require a The
Contributor
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. This may be our desired end result, but as of now Changing the type here would require a refactor, which is outside my current scope. The "Fixme" and empty string are meant to reinforce that this needs to be improved in a future refactor.
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.
Contributor
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. Accepted this suggestion and closed this PR. |
||
| })(this.wallet, this.storage, this.transaction); | ||
| } | ||
| this.emit('send-tx-success', this.transaction); | ||
|
|
||
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.
The idea is that the
ISendOutputis a combination of theISendDataOutputandISendTokenOutputwhich can be checked through thetypefield.Originally (before moving to typescript) the
typefield was only present on the data output which is why we don't use the others.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.
What's your point here? I didn't follow
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.
Sorry, this was an "information only" comment, not trying to request any changes