-
Notifications
You must be signed in to change notification settings - Fork 9
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
Show Stake Claim NFT details #956
Show Stake Claim NFT details #956
Conversation
@@ -189,12 +189,13 @@ extension NonFungibleTokenDetails.ViewState.TokenDetails { | |||
} | |||
|
|||
extension OnLedgerEntity.NonFungibleToken.NFTData { | |||
private static let standardFields: [OnLedgerEntity.NonFungibleToken.NFTData.StandardField] = [.name, .description, .keyImageURL] |
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 used for now to show the claim_epoch
and claim_amount
as arbitrary fields. It needs to be clarified if we should display those two fields in a different way in NFT details.
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 a good idea, but for most, if not all, standard fields we will want to map the key to a localised string key, right?
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.
Standard fields do have a predefined way of being displayed - like the name
is shown as the sheet title, the keyImageURL
is shown as an image. We don't actually display the name of the field, we do show its content in some predefined way.
But true, if there is ever the case of showing the name of the standard field, it would be localised.
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.
Sure, for those ones, but this PR makes me think that there might be fields that should be displayed as labeled values. I suppose actually it would make more sense to separate that concept from the standard field concept, and just have something like fieldNameMapping: [OnLedgerEntity.NonFungibleToken.NFTData.AnyKey: LocalizedStringKey]
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.
ArbitraryFields are the ones that are named, but not localised. It was introduced this with my previous PR.
...Wallet/Features/AssetsFeature/Components/PoolUnitsList/Components/LSUResource/LSUStake.swift
Outdated
Show resolved
Hide resolved
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.
LGTM!
Display the stake claim nft details
Demo
RPReplay_Final1702372059.MP4