diff --git a/alby/models.go b/alby/models.go index b73a840c..c773e7d7 100644 --- a/alby/models.go +++ b/alby/models.go @@ -34,15 +34,19 @@ type AlbyLinkAccountRequest struct { Renewal string `json:"renewal"` } +type AlbyMeHub struct { + LatestVersion string `json:"latest_version"` +} type AlbyMe struct { - Identifier string `json:"identifier"` - NPub string `json:"nostr_pubkey"` - LightningAddress string `json:"lightning_address"` - Email string `json:"email"` - Name string `json:"name"` - Avatar string `json:"avatar"` - KeysendPubkey string `json:"keysend_pubkey"` - SharedNode bool `json:"shared_node"` + Identifier string `json:"identifier"` + NPub string `json:"nostr_pubkey"` + LightningAddress string `json:"lightning_address"` + Email string `json:"email"` + Name string `json:"name"` + Avatar string `json:"avatar"` + KeysendPubkey string `json:"keysend_pubkey"` + SharedNode bool `json:"shared_node"` + Hub AlbyMeHub `json:"hub"` } type AlbyBalance struct { diff --git a/api/api.go b/api/api.go index 51b2a789..38443aa1 100644 --- a/api/api.go +++ b/api/api.go @@ -580,7 +580,6 @@ func (api *api) GetInfo(ctx context.Context) (*InfoResponse, error) { info.AlbyAuthUrl = api.albyOAuthSvc.GetAuthUrl() info.OAuthRedirect = !api.cfg.GetEnv().IsDefaultClientId() info.Version = version.Tag - info.LatestVersion = version.GetLatestReleaseTag() albyUserIdentifier, err := api.albyOAuthSvc.GetUserIdentifier() if err != nil { logger.Logger.WithError(err).Error("Failed to get alby user identifier") diff --git a/api/models.go b/api/models.go index f922f9f6..baa5be0d 100644 --- a/api/models.go +++ b/api/models.go @@ -154,7 +154,6 @@ type InfoResponse struct { AlbyUserIdentifier string `json:"albyUserIdentifier"` AlbyAccountConnected bool `json:"albyAccountConnected"` Version string `json:"version"` - LatestVersion string `json:"latestVersion"` Network string `json:"network"` } diff --git a/frontend/src/assets/suggested-apps/bitcoin-connect.png b/frontend/src/assets/suggested-apps/bitcoin-connect.png deleted file mode 100644 index 81859503..00000000 Binary files a/frontend/src/assets/suggested-apps/bitcoin-connect.png and /dev/null differ diff --git a/frontend/src/components/SidebarHint.tsx b/frontend/src/components/SidebarHint.tsx index 67bf68f7..3aa1a1c4 100644 --- a/frontend/src/components/SidebarHint.tsx +++ b/frontend/src/components/SidebarHint.tsx @@ -49,6 +49,7 @@ function SidebarHint() { // User has funds to migrate if ( hasChannelManagement && + info?.backendType === "LDK" && albyBalance && albyBalance.sats * (1 - ALBY_SERVICE_FEE) > ALBY_MIN_BALANCE + 50000 /* accomodate for onchain fees */ diff --git a/frontend/src/components/SuggestedAppData.tsx b/frontend/src/components/SuggestedAppData.tsx index 7fb22672..159c1c93 100644 --- a/frontend/src/components/SuggestedAppData.tsx +++ b/frontend/src/components/SuggestedAppData.tsx @@ -1,6 +1,5 @@ import alby from "src/assets/suggested-apps/alby.png"; import amethyst from "src/assets/suggested-apps/amethyst.png"; -import bc from "src/assets/suggested-apps/bitcoin-connect.png"; import damus from "src/assets/suggested-apps/damus.png"; import hablanews from "src/assets/suggested-apps/habla-news.png"; import kiwi from "src/assets/suggested-apps/kiwi.png"; @@ -126,13 +125,6 @@ export const suggestedApps: SuggestedApp[] = [ webLink: "https://lume.nu/", logo: lume, }, - { - id: "bitcoin-connect", - title: "Bitcoin Connect", - description: "Connect to apps", - webLink: "https://bitcoin-connect.com/", - logo: bc, - }, { id: "kiwi", title: "Kiwi", diff --git a/frontend/src/components/layouts/AppLayout.tsx b/frontend/src/components/layouts/AppLayout.tsx index 96eb9eac..bde01f65 100644 --- a/frontend/src/components/layouts/AppLayout.tsx +++ b/frontend/src/components/layouts/AppLayout.tsx @@ -185,10 +185,9 @@ export default function AppLayout() { const upToDate = info?.version && - info.latestVersion && + albyMe?.hub.latest_version && info.version.startsWith("v") && - info.latestVersion.startsWith("v") && - info.version.substring(1) >= info.latestVersion.substring(1); + info.version.substring(1) >= albyMe?.hub.latest_version; return ( <> @@ -224,7 +223,9 @@ export default function AppLayout() { {upToDate ? (
Alby Hub is up to date!
) : ( -Alby Hub {info?.latestVersion} available!
++ Alby Hub {albyMe?.hub.latest_version} available! +
)} diff --git a/frontend/src/components/ui/theme-provider.tsx b/frontend/src/components/ui/theme-provider.tsx index bb897bf9..d9be4651 100644 --- a/frontend/src/components/ui/theme-provider.tsx +++ b/frontend/src/components/ui/theme-provider.tsx @@ -35,7 +35,8 @@ export function ThemeProvider({ ...props }: ThemeProviderProps) { const [theme, setTheme] = useState