support repost amount

This commit is contained in:
zeppi 2020-12-16 22:35:12 -05:00 committed by Sean Yesmunt
parent 8adf3dada3
commit a37f195d73
4 changed files with 11 additions and 5 deletions

3
dist/bundle.es.js vendored
View file

@ -2224,7 +2224,8 @@ const makeSelectClaimForUri = (uri, returnRepost = true) => reselect.createSelec
return _extends$3({}, repostedClaim, {
repost_url: uri,
repost_channel_url: channelUrl
repost_channel_url: channelUrl,
repost_amount: claim && claim.meta && claim.meta.effective_amount
});
} else {
return claim;

View file

@ -33,6 +33,8 @@ declare type GenericClaim = {
value_type: 'stream' | 'channel',
signing_channel?: ChannelClaim,
repost_channel_url?: string,
repost_url?: string,
repost_bid_amount?: string,
purchase_receipt?: PurchaseReceipt,
meta: {
activation_height: number,

2
flow-typed/Claim.js vendored
View file

@ -33,6 +33,8 @@ declare type GenericClaim = {
value_type: 'stream' | 'channel',
signing_channel?: ChannelClaim,
repost_channel_url?: string,
repost_url?: string,
repost_bid_amount?: string,
purchase_receipt?: PurchaseReceipt,
meta: {
activation_height: number,

View file

@ -127,6 +127,7 @@ export const makeSelectClaimForUri = (uri: string, returnRepost: boolean = true)
...repostedClaim,
repost_url: uri,
repost_channel_url: channelUrl,
repost_amount: claim && claim.meta && claim.meta.effective_amount,
};
} else {
return claim;
@ -258,8 +259,8 @@ export const makeSelectMyPurchasesForPage = (query: ?string, page: number = 1) =
const end = Number(page) * Number(PAGE_SIZE);
return matchingFileInfos && matchingFileInfos.length
? matchingFileInfos
.slice(start, end)
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
.slice(start, end)
.map(fileInfo => fileInfo.canonical_url || fileInfo.permanent_url)
: [];
}
);
@ -365,8 +366,8 @@ export const makeSelectDateForUri = (uri: string) =>
(claim.value.release_time
? claim.value.release_time * 1000
: claim.meta && claim.meta.creation_timestamp
? claim.meta.creation_timestamp * 1000
: null);
? claim.meta.creation_timestamp * 1000
: null);
if (!timestamp) {
return undefined;
}