-
Notifications
You must be signed in to change notification settings - Fork 122
[C-5822] Edit track to tan-query #11592
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
base: main
Are you sure you want to change the base?
Conversation
|
} catch (error) { | ||
console.error('Error getting or creating user bank', error) | ||
throw error | ||
} |
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.
sentry instead of console?
I've also been wondering - should we add a try/catch (or some wrapper) to all our hooks to report to sentry?
existingStems, | ||
updatedStems | ||
}: UpdateStemsArgs) => { | ||
const inProgressStemUploads = getCurrentUploads( |
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.
is this synchronous? Is not a useSelector type of hook?
edit: oh duh I see you're passing in state as of the call time
const addedStemsWithFiles = addedStems?.filter( | ||
(stem) => 'file' in stem | ||
) as StemUploadWithFile[] |
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.
nit: this could be done in the filter above
// Create a mutable copy of metadata | ||
let updatedMetadata = { | ||
...metadata | ||
} as Track & TrackMetadataForUpload |
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.
is this object not just the metadata type? Track
being added on here is a lil smelly
if (optimisticMetadata.musical_key) { | ||
optimisticMetadata.musical_key = | ||
formatMusicalKey(optimisticMetadata.musical_key) ?? null | ||
} | ||
|
||
// Format BPM | ||
if (optimisticMetadata.bpm) { | ||
optimisticMetadata.bpm = Number(optimisticMetadata.bpm) | ||
} |
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.
why is this necessary? Shouldn't this have been handle above on the updatedMetadata
?
usdc_purchase: { | ||
price: priceCents, | ||
splits: { | ||
[ownerUserbank?.toString() ?? '']: priceWei |
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.
noop: I vaguely remember this ?? ''
causing issues in indexing or something - wondering if we should just throw here if the userbank doesn't exist 🤔
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 comments but otherwise LGTM
Co-authored-by: JD Francis <[email protected]>
leaving this one for @dylanjeffers to shepherd next week. Don't want to introduce regressions and leave without handing off context |
Description
Remaining usages of editTrack saga path
How Has This Been Tested?
Edits working on web and mobile
stems upload working
premium content working