Skip to content

introduce stars#659

Closed
gudnuf wants to merge 1 commit intocache-mint-infofrom
introduce-stars
Closed

introduce stars#659
gudnuf wants to merge 1 commit intocache-mint-infofrom
introduce-stars

Conversation

@gudnuf
Copy link
Contributor

@gudnuf gudnuf commented Sep 30, 2025

depends on #658

This introduces basic handling for star accounts. A star account is a cashu account with a mint that only allows internal melts.

  • removed star accounts from account list
  • removed star account balances from main balance and currency switcher balances
  • added a new account icon for for star.

NOTE: that I decided not to make a new account type called star because its exactly the same as a cashu account with some minor changes in how they're handled in the UX. If we define a new star account, then everywhere we check if account.type === 'cashu' we also have to check if the type is star

@gudnuf gudnuf requested a review from jbojcic1 September 30, 2025 05:05
@gudnuf gudnuf self-assigned this Sep 30, 2025
@vercel
Copy link

vercel bot commented Sep 30, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
agicash Ready Ready Preview Comment Oct 21, 2025 10:24pm

@supabase
Copy link

supabase bot commented Sep 30, 2025

This pull request has been ignored for the connected project hrebgkfhjpkbxpztqqke because there are no changes detected in supabase directory. You can change this behaviour in Project Integrations Settings ↗︎.


Preview Branches by Supabase.
Learn more about Supabase Branching ↗︎.

return new Money({ amount: 0, currency: account.currency });
};

export const isStarAccount = (account: Account) =>
Copy link
Collaborator

@jbojcic1 jbojcic1 Oct 13, 2025

Choose a reason for hiding this comment

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

I think we should use more descriptive name. If you need to explain what star account is it's a signal name is not good. Maybe internal accounts is better? Loyalty accounts maybe sounds the best

Copy link
Collaborator

Choose a reason for hiding this comment

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

what happens with this and our other "offline account" pr? if you need mint info to classify account as star, when it is offline, would it get classifed as regular account?

<SettingsNavButton to="/settings/accounts">
<AccountTypeIcon type={defaultAccount.type} />
<AccountTypeIcon
type={isStarAccount(defaultAccount) ? 'star' : defaultAccount.type}
Copy link
Collaborator

Choose a reason for hiding this comment

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

rewards only accounts can be default?

return (
<div className="flex w-full items-center gap-4 px-3 py-4">
<AccountTypeIcon type={account.type} />
<AccountTypeIcon type={isStarAccount(account) ? 'star' : account.type} />
Copy link
Collaborator

Choose a reason for hiding this comment

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

maybe AccountTypeIcon can renamed to AccountIcon and we can have this logic inside?

currency?: Currency;
type?: T;
excludeStarAccounts?: boolean;
starAccountsOnly?: boolean;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think having filter?: 'star' | 'non-star' or internalAccount?: boolean or something liek that makes better api. with this api caller can specify excludeStarAccounts: true and starAccountsOnly: true which doesn't make sense

@gudnuf
Copy link
Contributor Author

gudnuf commented Jan 27, 2026

this is outdated, I redid this in #758. Closing now

@gudnuf gudnuf closed this Jan 27, 2026
@gudnuf gudnuf deleted the introduce-stars branch January 29, 2026 23:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

P2 Medium priority

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments