Skip to content
This repository has been archived by the owner on Feb 3, 2025. It is now read-only.

Disable mutiny plus profiles instead of delete #1173

Merged
merged 1 commit into from
May 9, 2024

Conversation

AnthonyRonning
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

@AnthonyRonning AnthonyRonning force-pushed the disable-mutiny-plus branch 2 times, most recently from 98f4e2e to 7a9645f Compare May 8, 2024 23:45
@AnthonyRonning AnthonyRonning merged commit 8c127e4 into master May 9, 2024
9 checks passed
@AnthonyRonning AnthonyRonning deleted the disable-mutiny-plus branch May 9, 2024 00:04
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants