Skip to content

Remove unused vaultEntries during upsertWallet #2114

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

Closed
wants to merge 1 commit into from

Conversation

ekzyis
Copy link
Member

@ekzyis ekzyis commented Apr 18, 2025

Description

I think this isn't needed anymore but I still need to verify.

Checklist

Are your changes backwards compatible? Please answer below:

yes

On a scale of 1-10 how well and how have you QA'd this change and any features it might affect? Please answer below:

tbd

For frontend changes: Tested on mobile, light and dark mode? Please answer below:

n/a

Did you introduce any new environment variables? If so, call them out explicitly here:

no

@ekzyis ekzyis added the wallets label Apr 18, 2025
@ekzyis ekzyis marked this pull request as draft April 18, 2025 00:20
@ekzyis ekzyis mentioned this pull request Apr 18, 2025
13 tasks
@ekzyis
Copy link
Member Author

ekzyis commented Apr 18, 2025

Ok this is still needed. It's used here:

} else if (requiredWithout) {
const myName = serverSide ? 'vaultEntries' : name
const partnerName = serverSide ? 'vaultEntries' : requiredWithout
// if a cycle breaker between this pair hasn't been added yet, add it
if (!cycleBreaker.some(pair => pair[1] === myName)) {
cycleBreaker.push([myName, partnerName])
}
// if we are the server, the pairSetting will be in the vaultEntries array
acc[name] = acc[name].when([partnerName], ([pairSetting], schema) => {
if (!pairSetting || (serverSide && !pairSetting.some(v => v.key === requiredWithout))) {
return schema.required(`required if ${requiredWithout} not set`)
}
return Yup.mixed().or([schema.test({
test: value => value !== pairSetting,
message: `${name} cannot be the same as ${requiredWithout}`
}), Yup.mixed().notRequired()])
})
}
}

sooo looking forward to refactor all of this code

@ekzyis ekzyis closed this Apr 18, 2025
@ekzyis ekzyis deleted the upsert-wallet-remove-unused-vaultentries branch April 18, 2025 19:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant