-
Notifications
You must be signed in to change notification settings - Fork 70
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
fix: fix types related to transactions #96
base: master
Are you sure you want to change the base?
Conversation
src/types.ts
Outdated
@@ -280,7 +281,7 @@ export interface TransactionResponse { | |||
status: TransactionStatus; | |||
txHash: string; | |||
numOfConfirmations?: number; | |||
subStatus?: string; | |||
subStatus?: TransactionStatus; |
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.
this is incorrect, subStatus is not of type TransactionStatus
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.
Removed.
customerRefId?: string; | ||
amountInfo?: AmountInfo; | ||
feeInfo?: FeeInfo; | ||
signedMessages?: SignedMessageResponse[]; |
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.
signedMessages
is an optional field
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.
Same comment.
extraParameters?: any; | ||
externalTxId?: string; | ||
destinations?: TransactionResponseDestination[]; | ||
destinations: TransactionResponseDestination[]; |
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.
destination
is an optional field
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.
An array is always returned, so it is always defined.
It is likely done this way because that makes the end-user work easier, you can just look through it whether it is empty or not.
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.
some of the types are incorrect
Update interfaces: - InternalWalletAsset - CreateTransactionResponse - TransactionResponse Update comments of functions throwing: - getVaultAccountsWithPageInfo - getTransactionById - validateAddress
7bbe935
to
a77c80b
Compare
5ed9213
to
07d434b
Compare
07d434b
to
5fa77bc
Compare
Update interfaces:
Update comments of functions throwing:
Pull Request Description
Some interfaces did not match what the API returns, therefore I fixed them.
Type of change
How Has This Been Tested?
Checklist: