effective amount number

This commit is contained in:
zeppi 2020-12-15 22:31:33 -05:00
parent 4f57992762
commit 664df6237d
2 changed files with 12 additions and 3 deletions

8
dist/bundle.es.js vendored
View file

@ -2364,7 +2364,7 @@ const makeSelectAmountForUri = uri => reselect.createSelector(makeSelectClaimFor
});
const makeSelectEffectiveAmountForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
return claim && claim.meta && claim.meta.effective_amount;
return claim && claim.meta && typeof claim.meta.effective_amount === 'string' && Number(claim.meta.effective_amount);
});
const makeSelectContentTypeForUri = uri => reselect.createSelector(makeSelectClaimForUri(uri), claim => {
@ -2466,7 +2466,11 @@ const makeSelectPendingClaimForUri = uri => reselect.createSelector(selectPendin
let uriStreamName;
let uriChannelName;
try {
({ isChannel: uriIsChannel, streamName: uriStreamName, channelName: uriChannelName } = parseURI(uri));
({
isChannel: uriIsChannel,
streamName: uriStreamName,
channelName: uriChannelName
} = parseURI(uri));
} catch (e) {
return null;
}

View file

@ -387,7 +387,12 @@ export const makeSelectEffectiveAmountForUri = (uri: string) =>
createSelector(
makeSelectClaimForUri(uri),
claim => {
return claim && claim.meta && claim.meta.effective_amount;
return (
claim &&
claim.meta &&
typeof claim.meta.effective_amount === 'string' &&
Number(claim.meta.effective_amount)
);
}
);