Skip to content
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

Disable mutiny plus profiles instead of delete #1173

Merged
merged 1 commit into from
May 9, 2024

Conversation

TonyGiorgio
Copy link
Contributor

This partially solves this problem: MutinyWallet/mutiny-web#1130

It at least lets you "disable" mutiny+ subscriptions. Nothing yet to make it enable though, but it at least doesn't charge people money that explicitly removed the old profile.

Basically we need to disable, not full remove, because we ensure that a profile exists for subscribers.

Copy link
Collaborator

@benthecarman benthecarman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good catch,

Comment on lines -2155 to 2162
Some(profile) => {
if profile.tag != NwcProfileTag::Subscription {
let mut nwc = profile.clone();
nwc.tag = NwcProfileTag::Subscription;
self.nostr.edit_nwc_profile(nwc)?;
}
if let Some(nwc) = nwc {
// only should have to submit the NWC if never created locally before
subscription_client.submit_nwc(nwc).await?;
}
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why delete this?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Because it's not needed. Why keep it?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use this in the front end to mark it as a subscription so we know to not display the nwc connection string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should already be marked correctly

ah okay, this was for fixing old profiles, that's fine then

mutiny-core/src/lib.rs Show resolved Hide resolved
mutiny-core/src/nostr/mod.rs Outdated Show resolved Hide resolved
@TonyGiorgio TonyGiorgio force-pushed the disable-mutiny-plus branch 2 times, most recently from 98f4e2e to 7a9645f Compare May 8, 2024 23:45
@TonyGiorgio TonyGiorgio merged commit 8c127e4 into master May 9, 2024
9 checks passed
@TonyGiorgio TonyGiorgio deleted the disable-mutiny-plus branch May 9, 2024 00:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants