fix: unblock neobank-demo CI and resolve Cursor findings for #9853 - #9861
Merged
Conversation
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Fixes the three real CI failures on #9853 and resolves the outstanding Cursor/Bugbot findings.
CI failures fixed
Build (24.x)TS2345/TS2739inRampsController.addAutoramp— the inline union check did not narrowAutorampAccountisFullAutorampAccounttype guardLint (messenger-action-types:check)TransactionPayController-method-action-types.tswas stale after a JSDoc update tovaultIronPayoutmessenger-action-types:generateTest (18/20/22.x) (@metamask/ramps-controller)Cursor/Bugbot findings
#ensureUserStatusPollingcalled.unref()directly, which throws in React Native/browser where timers are numbers. Nowunref?.().session_not_in_valid_statepath called#applyUserStatuswith no generation check, so areset()mid-flight could forceuserStatus: completedand publishstatusChangedon an idle controller. Added the generation guard.moonpayCustomerIdsurvived a switch to another vendor, sogetCustomerIdentitycould report a MoonPay id underiron. It is now cleared ininitialize(non-MoonPay vendor) andcreateIronCustomer.??merge introduced for lint let an empty-string remotecustomerId/walletAddressoverwrite valid local values. Restored explicit non-empty checks inapplyAutorampRemoteStatusandmapNeoBankAutorampToRemoteSnapshot.Notes
/* istanbul ignore next */incontroller-integration.tsare unreachable through the public surface (every caller filters onisSyncableAutorampor a non-empty storage key). The unused default parameter on the privatesaveAutorampsToUserStoragewas dropped instead.Test plan
yarn workspace @metamask/ramps-controller run test— pass, thresholds metyarn workspace @metamask/kyc-controller run test— pass, 100% coverageyarn workspace @metamask/transaction-pay-controller run test— passyarn build— passyarn lint:tsc— passyarn messenger-action-types:check— passeslint+oxfmt --checkon all changed files — passchangelog:validatefor the three packages — passMade with Cursor