-
Notifications
You must be signed in to change notification settings - Fork 572
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
Rahul/ifl 1603 make asset response consistent across all endpoints #4272
Merged
patnir
merged 27 commits into
staging
from
rahul/ifl-1603-spike-field-update-method-for-burnassets
Sep 13, 2023
Merged
Changes from 8 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
84e4811
new burn asset response with asset object
patnir 6ba92da
updating tests
patnir dfdf840
moving asset to a types file to be reused in mint and burn
patnir a9fd8f8
updating test
patnir d659113
adding two different construct rpc methods
patnir de11199
updating RcpAccountAssetBalanceDeltaSchema
patnir de6602e
updating get account transactions
patnir 2ee8aff
deprecating asset variables in balance endpoints
patnir 067e459
removing asset object when id doesn't guarantee asset object is found
patnir bc00c67
removing optional asset object
patnir d9251c6
removing unused variable
patnir 862744a
removing construct functions
patnir dee7827
removing optional asset object
patnir 416e7dd
deprecating asset name fields in note, mint, and burn
patnir 009d009
normalizing rpc asset object for all endpointS
patnir 3fdcbb1
fixing tests
patnir e06918b
using asset value object
patnir 8153ee0
adding back GetAssetResponse
patnir 9371644
reverting client ts changes
patnir 804d84b
show n/a if supply is not available
patnir d12c57e
Merge branch 'staging' into rahul/ifl-1603-spike-field-update-method-…
patnir 7bb9d34
chain get asset uses same asset model
patnir acfc85c
using Assert.isNotUndefined(accountAsset)
patnir 425e638
deprecating the status field on the asset
patnir 0e00ba2
adding comment
patnir b4bdc00
removing expect
patnir cc80b3f
Resetti9ng fixture
patnir File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,12 @@ import { TransactionValue } from '../../../wallet/walletdb/transactionValue' | |
import { RpcRequest } from '../../request' | ||
import { RpcSpend, RpcSpendSchema } from '../chain' | ||
import { ApiNamespace, routes } from '../router' | ||
import { RpcWalletNote, RpcWalletNoteSchema } from './types' | ||
import { | ||
RcpAccountAssetBalanceDelta, | ||
RcpAccountAssetBalanceDeltaSchema, | ||
RpcWalletNote, | ||
RpcWalletNoteSchema, | ||
} from './types' | ||
import { | ||
getAccount, | ||
getAccountDecryptedNotes, | ||
|
@@ -43,7 +48,7 @@ export type GetAccountTransactionsResponse = { | |
expiration: number | ||
timestamp: number | ||
submittedSequence: number | ||
assetBalanceDeltas: Array<{ assetId: string; assetName: string; delta: string }> | ||
assetBalanceDeltas: RcpAccountAssetBalanceDelta[] | ||
Comment on lines
-46
to
+51
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. using an already defined object |
||
notes?: RpcWalletNote[] | ||
spends?: RpcSpend[] | ||
} | ||
|
@@ -79,17 +84,7 @@ export const GetAccountTransactionsResponseSchema: yup.ObjectSchema<GetAccountTr | |
expiration: yup.number().defined(), | ||
timestamp: yup.number().defined(), | ||
submittedSequence: yup.number().defined(), | ||
assetBalanceDeltas: yup | ||
.array( | ||
yup | ||
.object({ | ||
assetId: yup.string().defined(), | ||
assetName: yup.string().defined(), | ||
delta: yup.string().defined(), | ||
}) | ||
.defined(), | ||
) | ||
.defined(), | ||
assetBalanceDeltas: yup.array(RcpAccountAssetBalanceDeltaSchema).defined(), | ||
notes: yup.array(RpcWalletNoteSchema).defined(), | ||
spends: yup.array(RpcSpendSchema).defined(), | ||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
using an already defined object